From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id prhuOJTEC2Zt+R8AWB0awg (envelope-from ) for ; Tue, 02 Apr 2024 04:40:52 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=cK2KPSce; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CBFAE1E0C0; Tue, 2 Apr 2024 04:40:52 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 23FFA1E08C for ; Tue, 2 Apr 2024 04:40:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F4333858425 for ; Tue, 2 Apr 2024 08:40:49 +0000 (GMT) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2125.outbound.protection.outlook.com [40.107.237.125]) by sourceware.org (Postfix) with ESMTPS id A13353858C78 for ; Tue, 2 Apr 2024 08:40:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A13353858C78 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A13353858C78 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.237.125 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712047229; cv=pass; b=t1TBh9toZUUPXgg+QfZ/EG3OqyhY/L9070jBpk4ANUghqePa1v0eY4mWy+N9Z42mLjgUd4q8cxaPW8nzZhe1nQkk/NG76be4+LNGCzU6TLY+67ivLjaiawJvO8QAtG/yw6ITybc88xAMkIqkf1gTcTf2gzwnyWSdbK6vRqa1hnE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1712047229; c=relaxed/simple; bh=nq4trm52diNryP1RMkwOilaQg97d74D0nUsoAAAfm0o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xwSOwK7z/tISmBBsc9nNi6rgQVoIVTWYaYgko7Ng2x2sZSI68ZFLYJXc77VmahiifQqzZKOz0qhr0jgkzKeo67HNqGgmlenbCGgIfJaWMfVHfGh7hK88EiCZpysJPEoceX/N2qlU8hhtUqFNEmo0SH+iUrKW4RgY2MWzxucRPfQ= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X7rWd73BPDF3F24m2SHELwRC3uP8Riw+MvLGYWtMVnpDPeKGQglhcNXce1ocG3ttyC3ixXVIr9LubkHHOSvaEEolX1lFHTZVrVktkzXr2lGZhu0PibwARME4iVuXgQ19HlgE+wyqJa/vS7pi/njyhzE+0bgGkftD9pUOSrqvR7ONhIAEdnBzdYnrFvpFcgQ57W4Eh47VWTNg4NDR0gjCJbWHmxbD3AVpBaNbDaqA6ClZKtJ2tNKQNgWU69NvxkCmFBg1siA/hcnN+jsU7BhUOEMYrLPOXUYkEOUVKeQIAK/LIHrHHRms8776f1jD1+AQFfiMpV/GoiMqZCxPitnfCg== 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=WU8CPgD33e63bNUnJIIU7i2vZ7RZ+HJV7E2v+Nt/3l4=; b=JY7iZE1tI/jHci4Ndd2BVjN5zLrdL0+UZAuK9enjDEiNiG8Dr/HqLk5fMTcFP+0mSp4jM3dSfqZNM6lbmxTVS95QQI5Bo5ArD2Ni6MBXmtSUfOCQ5hoDMnMkmuMJHVqDhLBlHVikfS0QWyf1zvdYKnIQJLi5N5Qr8a0M9zwosKgSgi1slq4eQXumAR3cX7ib636TkXLHrvfyg2ROI1A8p5sM512hddD6ttVM0qViRATRU2PiwOAljpadLTjsUbT9lu231IC/BIce4JhQMVxrGGy8EHBpaklC4Knj6wSvG+m3L8RjSXzUrSWePOg9vDRYC4HzE85Ss0LfRxFSqrKxTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WU8CPgD33e63bNUnJIIU7i2vZ7RZ+HJV7E2v+Nt/3l4=; b=cK2KPSce+vFnZREulMuMK2nJkzTpLZLPc4L1/yD2iIZ/bHNTmWB2WXdBOX1JU+o6hRCQoAzQpzSNtLSuU7RIf/ezXwoCSZ9FUX5UH9+/r9mi2Mx0GAYWdFo8k2t0JYNlhP9+OiBqWNCnw6o5bsnogOaoKY764jcK1qrdL4Gbtts= Received: from CH3PR12MB9079.namprd12.prod.outlook.com (2603:10b6:610:1a1::9) by DS7PR12MB6119.namprd12.prod.outlook.com (2603:10b6:8:99::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Tue, 2 Apr 2024 08:40:25 +0000 Received: from CH3PR12MB9079.namprd12.prod.outlook.com ([fe80::f98e:8d91:f485:89f9]) by CH3PR12MB9079.namprd12.prod.outlook.com ([fe80::f98e:8d91:f485:89f9%3]) with mapi id 15.20.7409.042; Tue, 2 Apr 2024 08:40:25 +0000 From: "Six, Lancelot" To: Tom Tromey CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] gdb: ensure has dwarf info before reading DWZ file Thread-Topic: [PATCH] gdb: ensure has dwarf info before reading DWZ file Thread-Index: AQHahE8J7QPwvg7QXkyKFc6F0rqLWLFUo95g Date: Tue, 2 Apr 2024 08:40:25 +0000 Message-ID: References: <20240330110121.2292510-1-lancelot.six@amd.com> <87y19x9i9c.fsf@tromey.com> In-Reply-To: <87y19x9i9c.fsf@tromey.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=2ddb7d3e-0b9b-480b-aa74-3ea654110d05; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-04-02T08:17:45Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH3PR12MB9079:EE_|DS7PR12MB6119:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: v/iyiwrccPTb0nvpUuHiX/1rsnNfm+bYj6lphzYy3n1ia4hXumeoJIV2yY2vMzqfzKwAAaLFQ4NFVopnCmSpEmhDKpzBHrA+Tjgb7ebkFRqyBSKJBTqCEh14uNO5FYuqNr9/hY7bajjXxkMG6S3A503PU+2UJptzGyUd5uZ6GpvI+tkgWo6qqQBMrditqomc1Vm+2ADR7o+9hAMacN/xN9dvG60jfRSYepVDbN/h5mYfPmoOK6fbzdGk77Mjil2weU7mpX2HDH2bNoHIL4/OWGomLH+UXlc48Ybsawpb5QKElluE8MqAvWuP5QqAxXioROBPgZyDpiVpqxRl45IuxA4YFPrg6RIgMlZ/RwSLMfbZFuwOJZ3XYqTGXdlrUUie9UPt+BrFtgLU+23t29DQ3d2x8AoQEFU+/kC2HTihJBK1pI/MaxfDMZrjQP8C8pFKqg/BOHD0uPQiMbAIjhFLd8mN5yW4pZ4uXVhdjtOhEyg6znGXXonnYLgVOgoGdL7lSLJu85cUbVOCDnqhKUJtUQf+dOPo2EuefEWqW9+2TwVGEwtgLI6f3KgvgXF54x1jsO9/WuWnfW+yIr5KrsYbksZoIprapylAAjmlBuuOPhfN3mxoed+rox1OFjWD1edoAAXTKxJnNu4gkLaNpRCTP7ICvLlvfCg3/YRUpTEjl68= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB9079.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZqY/FRpercWs44lnQoTiAVM1Hi6md5ePp0JG6NBk2ih+VFCg2LqrX/A+lWJH?= =?us-ascii?Q?R/pmlW80e34GAfomLb0Brcec7CVe1DDig41nqIXPrJyUDgnmYd1xpvVHSI/t?= =?us-ascii?Q?1NPxNJGbOWViOmd5jyXdNx71LONtyqfEJVfJg6UU7UXgTvrpc9P6k4UxttyK?= =?us-ascii?Q?tOFvinb++o6MxFals0uiuld78FliRVEz/c6FBmqS3lBTvd9DZ/ZkXWt6SXtI?= =?us-ascii?Q?IcpE7/CljHVW0xKvkqbchrGrDGLMWAjLWtEORf+lpkhL0JMaFFFSTmMlpNbH?= =?us-ascii?Q?GdhuD704NbGbtZvptg+8bEMI0+tVouV/QNlghDU9mXEa+cAkPtCOzwS9dtDS?= =?us-ascii?Q?e7tfLL3JWBRufVE5J5r4cT9qDoMa5liaDgA6KzcuJklWmIUNRAaiKbvuJVjq?= =?us-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8CN3lWDIa53ZVWtCKC082H6YV?= =?us-ascii?Q?S5w61U2HibpAlW7mLi/WHiYUPpxCx1oatAsVN0LKljeVKyuoB+iQADc9Xcsj?= =?us-ascii?Q?vWTgDcUoIT2Qx9y0wczHf2oeBlXjk0sVAMl04IN0xav5HB7WdS6OpMmBcbs1?= =?us-ascii?Q?a81xn+dITNnpncJ3lUtjYjwBiO6pwuIIS+Z7Ad0Gf5CQ483ILSPCxVSBYyZN?= =?us-ascii?Q?hAJSks2L3rbTqsb8NynKD2PuseZhUjrCjKRBdatyHcu3XRv7HmNjHQnN/iOp?= =?us-ascii?Q?0GK0xBpIkrM0snrXAX4=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB9079.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf1607c4-d6f4-40c8-a54e-08dc52f08aa2 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2024 08:40:25.1293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eyR+lJ1wWh5SC2+jGchA6IDQRHGT6MaGnapvEw89gKPzjS5VF2hgxjsWtUygZkJZeN5OCRSCc3AoX3vzSvF7xQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6119 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org [AMD Official Use Only - General] > Lancelot> A consequence of this change is that the per_bfd->dwz_file > optional > Lancelot> object can now remain empty (instead of containing a nullptr), = so > also > Lancelot> this patch also adjusts dwarf2_get_dwz_file to account for this > Lancelot> possibility. This effectively reverts the changes to > Lancelot> dwarf2_get_dwz_file done by e9b738dfbdc. > > I'm curious about the motivation for this change. > Can dwarf2_get_dwz_file be called when dwarf2_has_info returns false? > > Tom It can be called when doing "save gdb-index" (dwarf2/index-write.c: save_gd= b_index_command). This case is exercised by "gdb.dwarf2/gdb-index-nodebug.= exp". Maybe a better approach could be to modify save_gdb_index_command to check = if there is any debug info before calling write_dwarf_index, but the curren= t try/catch approach is the construct currently taking core of that. Havin= g dwarf2_get_dwz_file return nullptr in that case does made sense to me, bu= t I can also go another direction. Best, Lancelot.