From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50074.outbound.protection.outlook.com [40.107.5.74]) by sourceware.org (Postfix) with ESMTPS id 8CC6D3858439 for ; Tue, 19 Jul 2022 14:46:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8CC6D3858439 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DL2RkQ5zwRCFt66MUZeR/N7Dt9a5OAkeWoW28e6MolqPKFNjZfHKlSobXJjqsxmBdSSkjsXeUHZq9PeN2DUB92BSE9yVPoMUrEDTKBWd/Kag2BfxtlQzKGdl0ARf2OJaH/4Nqt/AvoJp/y4imqlkCICt6bLnvbK9+Eu7nCE6JNR1qxuKrtGJ2Mky0EqAt9wa2HSfwchg1kA5FojtJRyBlvL5x5/EoI7xib3Gu0OC/HYwC12PioXzbUOEl0S9D+MdY4KuHJo2IC/OWKENr0zJVXIKvvFCxKPDAAAn4veFqOAo8XkfXxD4SxVWBVGIKpQR9kKK6C+L0Sm4t8kBut8hhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dpqnrjAs4gwHfpmu0KvEEQPO2ONcEfWhM33DxNpOXpQ=; b=hn5HCA3ijm4IOdWprlk7HDh3f+XOBxEFO+O48+lAaOUYlL7/8HmHoPORUa9FZ12f7BQNX3xhH9WlN/h7ChInCM7FlWhH2P7luOkEJyTUcOsCmzRhLp6GSHQAsdY4nnTamj2o2iP4J5GbiZ/VbHm3GUb8x51AOkFI1Gvmgx8p6bOb3XvSF5//3pXonwYuEdC4H0+TzrYNZa/haHo+qpN2CJruzvZaUwst9QtSkPgdG23nwIwHABetsNvHz1psV9+3TXdCzIksGbvm7Lq+rO4TBaylaZ/6XFvi5HvDCAbv2OM0mHhzwtFkwZAWmpQFvgFuiUyoa43OY6b6PfBo6L3fqw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1, 1, smtp.mailfrom=arm.com] dmarc=[1, 1, header.from=arm.com]) Received: from DB6PR1001CA0044.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::30) by AS8PR08MB8109.eurprd08.prod.outlook.com (2603:10a6:20b:54b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Tue, 19 Jul 2022 14:45:57 +0000 Received: from DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::13) by DB6PR1001CA0044.outlook.office365.com (2603:10a6:4:55::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 14:45:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT053.mail.protection.outlook.com (100.127.142.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 14:45:56 +0000 Received: ("Tessian outbound 6a3290ff1310:v123"); Tue, 19 Jul 2022 14:45:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c50e7d3284a6a22b X-CR-MTA-TID: 64aa7808 Received: from 277f4dcbd618.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 167DE885-DFFD-4B54-92C7-D30AD74A5BA6.1; Tue, 19 Jul 2022 14:45:49 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 277f4dcbd618.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 19 Jul 2022 14:45:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iAhqls3c7of0oOK0paLO5XnW2b3d1IhINt3s9KLlUrkl+qrwBpUzveAoXa+iJTBQ1aVjj+G1+ajEPHNDopA3tRMojKjIm9rC61q5YDO/z8cCH+Itu2CxbLHTjTUKE2QNFmANwzJz35MGp8LVsvaE74SfGtjzGwohh1MRzUM937vDfmFsZDaDVvzEYPORkTYlXt3lDpEMqN2YtwoN1Xs3j4YOT1cuRRC6pmrLeFjMdSLr84aL6vCXmWYXa93vKpl6+vaMClehShYaoQbzlvx2r96niYqQud21W3gMN9lX3Zwqpru4s19EvocIPetGIr/8cnfiPVz4XRvby676z4Lr1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dpqnrjAs4gwHfpmu0KvEEQPO2ONcEfWhM33DxNpOXpQ=; b=hStyuJjUU7I23gIYE0NWJ5vmbUP1nBLoNGxYdfNfLHEqpaDP8gt83J3DsWDGXX5B7guYh6eIxvBah+MMqsmXkycl4qJnHxWqk3RQuAPlrwamQkZV44TyztrjDCaQah7bmnJe7eY/+gcgH2GSwwAiCZBRZUwnUFyPyFdIWvn9jrcUa7ZdUfUhyoin1UbCsCsnDNtqoOfCYYCLaWxeWf7XHspAAv77hj5MXf695Ao0AXOQs3JGPB7D5A3vlLOpQaN1iOgCAgxF9OZnh4u0eNiLfpI1n+ci7KLPQ8W+iea3A7J2v3bR6m8sQrnY6aj8Uj88Y+5fUPdeV7CPNf+by25skQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6PR04CA0056.eurprd04.prod.outlook.com (2603:10a6:20b:f0::33) by AM0PR08MB3732.eurprd08.prod.outlook.com (2603:10a6:208:109::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Tue, 19 Jul 2022 14:45:46 +0000 Received: from VE1EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::3) by AM6PR04CA0056.outlook.office365.com (2603:10a6:20b:f0::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23 via Frontend Transport; Tue, 19 Jul 2022 14:45:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT006.mail.protection.outlook.com (10.152.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Tue, 19 Jul 2022 14:45:46 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Tue, 19 Jul 2022 14:45:45 +0000 Received: from e129171.arm.com (10.57.42.139) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.9 via Frontend Transport; Tue, 19 Jul 2022 14:45:45 +0000 From: Luis Machado To: Subject: [PATCH] Update auxv cache when there is no auxv cached data Date: Tue, 19 Jul 2022 15:45:42 +0100 Message-ID: <20220719144542.1478037-1-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: e706b51c-e3cd-45fc-9ecb-08da6995639d X-MS-TrafficTypeDiagnostic: AM0PR08MB3732:EE_|DBAEUR03FT053:EE_|AS8PR08MB8109:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: pUrZU1b4SWfe6Cn58oLzYCdtkMgJ1ZyOb2/n/l7Lk8xT2sEF0shWCOowIaNJRekjlODNYbXDOc/8HwyMFYjWvgvayExhrge+NTObFVAo+JoPEdAd+7ZXfBTUI/d/CtyWmMlCykp0CHZAIKXU65ghyGMzpUOL58douLhMKFFp/JgdVE3EnHGU/D9t/6X2OA9SPMPCCNFsvXnX9OkbzPWnVvhqoGvE8mj/gpiIzd0TUoQh837JucKH3Bgo615/lrAxy5x+9MgMrW8B552GzEKCzIMfzvGqTzL7+H3erS+U0otBdQYWRqnJF0YJUNUNg6V/5phJlmWSvD1NaIqVXvZgETYlnEaHfGcoDGkiBwy1G0PUx5/bGqROdjVuQcK2wHG9+S1pIn63RSBeE1TLwubkr1JKpqg4UWCYN4aqL46Xh6lLTDw1JNy9kiqjXVYFtRoCTLRqRhYNhGq0aSDkAYdQoD8gCOe/HgFcHF0SN4jGy6GKk3AbWJNGhrPVY3C6rXnJH3JkYshy+V6FWgYFe1vwrmLnsbv709jSHtpEYj0Fo41DxawzH0v/6cu+QHGxiROjN5KJoCnNPG7ExjsWuWiG+hCinVdoswjfB+PAgOyHR7A3h7MKjW/B6s19LZRynv+N2ib/ZoomYwJEzY2mZGkC9zs0VWtu0rT3mESdsTwgmlZ/RH3O4Vjq9ed4p7e7/pITcgOmjrDoZTS0sc33YoyleHX5MoplA2cVYAjVC6w9LFqyU/1VGItWY6x9VMQnRYCaeAwMkItuE/gAJ3i4ycVrA8S9XeS644uXB7gOHKoDK3yrsuuerpGTs8WcvQbSGcsViTqLWsXj8UZ4DJWwC+5z7hUWRjkjM7TKDLEj7Y8o/xc= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(136003)(376002)(39860400002)(36840700001)(40470700004)(46966006)(5660300002)(70206006)(8936002)(8676002)(70586007)(44832011)(82310400005)(15650500001)(40460700003)(40480700001)(36756003)(7696005)(2616005)(36860700001)(2906002)(84970400001)(81166007)(82740400003)(356005)(86362001)(478600001)(316002)(6916009)(26005)(83380400001)(41300700001)(47076005)(1076003)(6666004)(186003)(336012)(426003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3732 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 79b705d1-5c4c-4335-6948-08da69955d48 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qIP2oObyS8ptapvv0xRHIUy234glPie8Bf8c0S8r8GPzykgcIQ4i0yrN5pbLlGGwjI3PY/k002m1DAzhfn0ArSX0h0qa+4FsntfP/BgPczJoTlEIkxGfmUfu2fvA3haQJatO4cc3mZRbUPfqx4GzJBtNSNzzaQnn86EiyGJ4DUg4tLbRazk2+GH+wQzxI/AU8ak5rJeFKmgduKBhoaGFN1sn97062yVS0cMnOhHS0x8wTj+0fIe7hVdBLCbFjP8SmihkGl+NsYXeHAbbl8QkCy0+MVshWxaY+BgYVEyQb6mdbgOM7TGyQ0zeTHIeNuiOuiUxfR9jujwcqaa4/jdEhNapzhY+AqbYWFOReh/NbZPuoD8QjgOjtOYXShFrrRnEH4Bv6032T+4T6rvD+aP1QVIKvP3ZtkHFCydNVsDxzZCf6i8RN//eyRf7sw6SP2v2v7Da3iwONwpN7B6wkXw4mxRnrgAEzLXb12XzkXVMYiZ8lhArnGwWWSDyxGsSSFqFYRxzBDYqtrCsPXle+jZzd0yvTtBov84HwThFceor32LFqtFJ7hhGE4+UJ3DcY9xO0ojr9wnQVvKLaT9VWVe9J/TDd7fLv3n204IValTrhKezLDcD3yRyIAfXm65BLYDQOgtNUJQJb+vV1LKik/bF9Cu0TW9yxRJpXDUwZqJ3r05U3eFMM92a4/tm+ndkyNHsaOyt7D9LNRb7F60TY/BvgeZOGlR5xXlHYLGHdn9FeUwUHgtv5Np0O+UQ8JrowNWOJjXI8d6dslqyUIFyPm6kHNV1c+eaUAdh/briBDdEs63B5Kq42FwuXe22jvNwrwODByd7P2Lg3I3X98AZF132Mg== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(39860400002)(136003)(396003)(376002)(46966006)(36840700001)(40470700004)(26005)(6916009)(6666004)(82310400005)(2616005)(41300700001)(1076003)(7696005)(478600001)(84970400001)(40480700001)(83380400001)(81166007)(8936002)(186003)(5660300002)(44832011)(70206006)(426003)(86362001)(36860700001)(40460700003)(15650500001)(2906002)(36756003)(47076005)(82740400003)(8676002)(70586007)(316002)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2022 14:45:56.8508 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e706b51c-e3cd-45fc-9ecb-08da6995639d X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8109 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2022 14:46:03 -0000 While adding support for MTE corefiles and running the MTE corefile tests, I noticed a strange situation where loading the symbol file + core file through the command line has a different behavior compared to firing up GDB, loading the symbol file with the "file" command and then loading the core file with the "core" command. I tracked this down to gdb/auxv.c:get_auxv_inferior_data returning a valid info struct, but with no auxv data. We've been doing the auxv caching for a while now, but sometime between enabling auxv data caching and now, we turned the auxv data into an optional value. My guess is that these two modes of opening a symbol file + core file take slightly different paths in GDB, and in the latter case where we issue separate "file" and "core" commands, we first cache empty auxv data (no core file data yet) and later we just return that empty data as if it were valid. The following patch checks for an empty info->data field, and forces a re-fetch of auxv data if that is the case. With this patch, I see full passes for the gdb.arch/aarch64-mte-core testcase. --- gdb/auxv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/auxv.c b/gdb/auxv.c index 8e175138f5d..0d6a860e5f4 100644 --- a/gdb/auxv.c +++ b/gdb/auxv.c @@ -361,7 +361,7 @@ get_auxv_inferior_data (struct target_ops *ops) struct inferior *inf = current_inferior (); info = auxv_inferior_data.get (inf); - if (info == NULL) + if (info == NULL || !info->data.has_value ()) { info = auxv_inferior_data.emplace (inf); info->data = target_read_alloc (ops, TARGET_OBJECT_AUXV, NULL); -- 2.25.1