From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30065.outbound.protection.outlook.com [40.107.3.65]) by sourceware.org (Postfix) with ESMTPS id 29E27384144B for ; Mon, 25 Jul 2022 09:43:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 29E27384144B ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=MuL/jCXM3D2BXAaZEWghODoR+QFbiPnY5zcxcEXlK/1+sh81WmWc8YSHY3S0NVGc2BNHI/9lTwj4Ls1nSo60pHCSuHtTNvjyDC6JAfdfG3BWLv0VYaeHdEairHMXJqwHvoUieIDnNMuSRfxdL5O+hJyyKBJKM/jUqzYBZzMQiZWfHoo/n5esYg+wwgvacviHcM/PmDiPb+COsCGZsmDd3DR2Tz9JeU7LmRJfKfH53XSh7LGG0nE6qGrlZ/cZsB/nmZh6WrmSIiLxfHenby6rs+4uaRaai/EO2Wi25CrEVa2MTiyB1p30xX/O0neheE13pdXXaFKiXFPNFvavzZ9iDw== 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=YAgj2rr/FYAWE6JufRMiZ2VMtra3Euis0dE2wguVfMo=; b=JPA4kYX9ZriFwWYAf6UTJgXURUOxLckMKD9Jpeuf8NIztTn1mRTQ5/EvKqvjtU7W+9s/Z2MeuvB9irvDGRIkc19WvDgfDMqeUegpuvgonkOe/SwZypp8fPY4BDfQI5TzUv9rEZlfsTs//0nq/6+zrSy1ZbKTcvwk7WdpDcKE272uBjK3jEFHS7zXVuOZ2dTOdO89qk22D4CgP9cLjtr1FtOVI3shPgoP2Mkzfp6dCvMbKV/dAJJH0iN+tLLEREZKtQPnMq4lhWcmCAzJ6CVVEtYQN4SH/1VTiUMsxUfUKkM8gyk9Nb59QZh4hVmCRtSfJZtv4I66wXz6HPLr+3aPqg== 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] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from AM5PR0301CA0029.eurprd03.prod.outlook.com (2603:10a6:206:14::42) by PAXPR08MB6429.eurprd08.prod.outlook.com (2603:10a6:102:dc::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Mon, 25 Jul 2022 09:43:02 +0000 Received: from AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:14:cafe::a7) by AM5PR0301CA0029.outlook.office365.com (2603:10a6:206:14::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.24 via Frontend Transport; Mon, 25 Jul 2022 09:43:02 +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 AM5EUR03FT011.mail.protection.outlook.com (10.152.16.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.17 via Frontend Transport; Mon, 25 Jul 2022 09:43:02 +0000 Received: ("Tessian outbound 63c09d5d38ac:v123"); Mon, 25 Jul 2022 09:43:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5eb3243e3475e74b X-CR-MTA-TID: 64aa7808 Received: from 6d52edf787bf.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 28A4DA16-FCA1-4D09-BF32-B17C19806499.1; Mon, 25 Jul 2022 09:42:55 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6d52edf787bf.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 25 Jul 2022 09:42:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GDuCQlGHKmQURpWAWU6WLFN1FTf+XhqC6TwMmbHzwwWCKi9vwjDuY2wymsUrHBQRnuQW4oLUZ5jfY60z4g2HVLFVJXDf+aq961nemEHLiOkkHANLD3PVn5exFPJVEarJwJCwnots+SH20pf2J+KgyxyiWx6N98Pwx4USKP6RcDZw5pN05Vps6qZqjCep1lQ3o/pXJLHYjw6QgpAtpIVnErBuqLC3gt7b5FrHpfUtEET24oXTEZk4dWOHtquNCq2hMp12M5RbyQl1Up4ToEZeZhvdMx5BMnonz49O/MBKlfCpQ3mwp/8TcOVpPU3VfeSMKhClhmAWz47GLa0+niVTTw== 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=YAgj2rr/FYAWE6JufRMiZ2VMtra3Euis0dE2wguVfMo=; b=EtvXNbVupn0h+srQB+5wYj+0qvvXpQQxmg5gTCsKAvf45jCLvFza0X/9tgkhcPqmCOqwC+9g0TWosL4/xyCI5iAwJIub7KP8gT9MeFHikwPzuCzm1csS2IxXqhGP/VJCfWOFBabjOErZnaCPMeYztIJcfrMhQLXpmPWpRUBZSJ9Q3KvHcaovy6NRWogucJsFjLdscFaRfgBJxq56htYvTjBrTE1BF4huHFEGeuq9gEARigBBjmV2TeFVhqCw2t8UTySO4qWVUDHmJo9GrMKCKRQDoCmEhVEx9pdsDweu07Vgf0+6z028Aiy+/n+02BsvPkKPKJp41J+XayWEflle4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by VI1PR0802MB2432.eurprd08.prod.outlook.com (2603:10a6:800:bb::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Mon, 25 Jul 2022 09:42:53 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e866:af0e:2168:5ca7]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e866:af0e:2168:5ca7%5]) with mapi id 15.20.5458.019; Mon, 25 Jul 2022 09:42:53 +0000 Message-ID: <85386ed6-3a4a-45d9-b830-a01e2decae38@arm.com> Date: Mon, 25 Jul 2022 10:42:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: [PING][PATCH] Update auxv cache when there is no auxv cached data Content-Language: en-US To: gdb-patches@sourceware.org References: <20220719144542.1478037-1-luis.machado@arm.com> From: Luis Machado In-Reply-To: <20220719144542.1478037-1-luis.machado@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0348.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18d::11) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: fc12ecb3-f963-4292-99df-08da6e221141 X-MS-TrafficTypeDiagnostic: VI1PR0802MB2432:EE_|AM5EUR03FT011:EE_|PAXPR08MB6429: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: 6tDgPLQKRhygy+4TvlI8VMGxCl7TOu8sD7ARhj/tBxuWfyJsBGiSKZT9UzcCdD+UjPMGDod9i5//cQ5wkKaHffbSTtKt/HeBAFNIyJUR+YSE86EfDxh3kRwAM9szJhnsx/BwgjpUC+jnF4OMIkKdMJYfcKAfJatcLs6CJWLjjDrzEYeWo/Ta01l21/KpJTIn1EJZ1FRD3DumH5f/a7ijmq2QYGI664jhGuvjv5op9NCBx/ElWz4zgyZuxcyWMBmSgKuAliZTxv5HDkQeUVoGZwJSQ8Gsvuu2/3NgFSSoesmN6dlN3Tbe0RZHFepEaeYnElrUZdjpWXFN/i4P2lZkpnW3tSwDx4xsGLoVuuEclS0LKfHaW/ayKWPaRTJFbkE2EySJ/VDspyjxo1AGEFk4uK5S9FFvfVV77jo3YgDI40v9ciO0Ca0qpcVM+pq1pSx7vxF3vLoofCOOocEa81wODnKpaQFjiyMiP3PG24N39soW6XYuYKZzGT3CDe7HzQsn4M41BKv0S5zG2VZcTRef3pyerCsl3+kmrjexJBEkLcrCkBsU2GtUx7RaAzEB61hMbFv6drpXTu4o6QvITn7UWsFcoxf75t8qqA86SY21aVai01fJ9y9etlcGl8qshmg7mPPtFtKg1lsSjcz4fI4UNud8OX4BEoX5JLen6wZbP1peIYY/WZEnQjQu0JIUBObHtcLXRJogi6SoHJKT4BiireM50ouoQh/Br0eAuqFgVjUsWlE6gpHNqldoJ3A2DWfxXm/GE3e1xQDuLMEKkNq8LG/5htEmhytcQCb02tcPNFdbpILdp1UAs4+PNnxPFVSaypNQ3cNo+8K2RPrxRDWvqjASpsgV/H4mvFC7slqVDbQ= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(376002)(366004)(39860400002)(396003)(6916009)(66946007)(66556008)(66476007)(38100700002)(8676002)(6486002)(84970400001)(6512007)(478600001)(26005)(53546011)(316002)(31696002)(86362001)(2906002)(41300700001)(15650500001)(6506007)(83380400001)(8936002)(36756003)(44832011)(186003)(31686004)(2616005)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2432 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: df3d7c12-869e-4d2b-f90d-08da6e220bb3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eglLASWFyhAxkwjjE02dEkAt/gO5X0Bv4JwJN/2LO7ByFhzA2YoL1URnjH6rHFhSkrqCtuIPgF3eNpk4eK8wuAwBgoLAQAVtR0RQrQ9lR+EBSpAUIQZQ7WWiydyFxz5JVYZ0YUP00l6hRgjlcNwLMk8o4MVYGoTs4kwgLOBLyByS7JTefOOIF/j2jOtGdV/dpz1+D1e0FC+MC4kLnJmKc4gn8LHzD65I/YtqG0xnoPQNCclScwJmKcZqXe3EbmdBqxGHZFa8OrjLS2jEbws5/DwnMk4XnjoeWXPERC5yU2i5F43eTL9stdjAV6nLKYR2XvuexobyMGeL2fGBlSJVFpnZYrOrJy8xEYwXnhsFmO/QwgAtW7ZftI6ZujuYznwWNCPfP7XHdR2UloArYGzog0aOORonRR+aAQePUdJNtoATdJgc9eFxyK5FT1+uTkScDcxqyzgCzH9Pn9NqndBJfBvks3ioJG/UzDIGX4u6T6nzrEpYWFCsEB2qTEOFJBDWXQyCI/VdZhtGkVYt/X2ZEz0z2OBeK496rBOCqohDw7hJFARUDKjN+v12s0kb/VtzfZjyQWtFM/Z7GLS9Le5HXCwfy1FZOxFugSuRgwb7vASnB7RscKHS+OmAKVOJsCvt6eAl31W3HLhES7hJwDrPQb34shvmi1VrwVnOn8q80gnW1sr41nx+2QXpo67gKSrPgJoNfpanPqRpO44W33U8s/V20+BEdRI/G0M9ei7mMijs7esNb7aoat0ubx+MztPXSKMJqS/PWbEUASntgqo5YROxvLGEr7cQc3NOKJsooMp+F9o9lacjchffoiiH5i3gAoSRo8Zn7tqsybEX1nDBvkY5ph/FYfjLzTgRQDn6ZOU= 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)(396003)(376002)(39860400002)(346002)(136003)(46966006)(40470700004)(36840700001)(84970400001)(6916009)(6512007)(478600001)(6486002)(316002)(41300700001)(2906002)(15650500001)(40460700003)(40480700001)(82310400005)(8676002)(70206006)(70586007)(5660300002)(44832011)(8936002)(86362001)(31696002)(36860700001)(356005)(82740400003)(83380400001)(336012)(81166007)(36756003)(31686004)(186003)(2616005)(47076005)(53546011)(26005)(6506007)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 09:43:02.3176 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc12ecb3-f963-4292-99df-08da6e221141 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: AM5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6429 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: Mon, 25 Jul 2022 09:43:07 -0000 On 7/19/22 15:45, Luis Machado via Gdb-patches wrote: > 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);