From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 88F123858415 for ; Tue, 3 Oct 2023 16:11:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 88F123858415 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 3BBF33031F8E; Tue, 3 Oct 2023 18:11:00 +0200 (CEST) Received: by r6.localdomain (Postfix, from userid 1000) id 03E463403E6; Tue, 3 Oct 2023 18:11:00 +0200 (CEST) Message-ID: <139ed0bb027de8c5c542d5ac8c33dca2490e3f53.camel@klomp.org> Subject: Re: [PATCH 03/14] libdw: Handle DW_AT_ranges in split DWARF 5 skeleton in dwarf_ranges From: Mark Wielaard To: Omar Sandoval , elfutils-devel@sourceware.org Date: Tue, 03 Oct 2023 18:10:59 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-3027.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,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 List-Id: Hi Omar, On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote: > From: Omar Sandoval >=20 > When commit 879f3a4f99df ("libdw: Handle .debug_rnglists in > dwarf_ranges.") added support for split DWARF 5 in 2018, GCC put all > range lists for split DWARF in the .debug_rnglists section of the > skeleton file (similarly to GNU DebugFission, which puts all range lists > in .debug_ranges in the skeleton file). >=20 > In 2021, after a discussion on the dwarf-discuss mailing list [1], GCC > changed this to match Clang's behavior. Now, ranges are in > .debug_rnglists.dwo in the split file, _except_ for one: the skeleton > unit DIE has a DW_AT_ranges attribute, and its ranges are in > .debug_rnglists in the skeleton file. See GCC commit 4b33c5aaab9e > ("dwarf2out: Fix up ranges for -gdwarf-5 -gsplit-dwarf [PR99490]") and > the Issue 210310.1 clarifying the DWARF standard [2]. >=20 > Unfortunately, this confuses dwarf_ranges, which always uses > .debug_rnglists.dwo if it exists. Fix it by special casing the unit > DIE: its range lists should be in .debug_rnglists if that exists, and > .debug_rnglists.dwo otherwise. >=20 > 1: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2021-March/002009.h= tml > 2: https://dwarfstd.org/issues/210310.1.html Thanks for all these references in the commit message. With that the 2 line change looks good. Applied. Thanks, Mark