Hi Omar,

On Wed, 2023-09-27 at 11:20 -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osan...@fb.com>
> 
> 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).
> 
> 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].
> 
> 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.
> 
> 1: https://lists.dwarfstd.org/pipermail/dwarf-discuss/2021-March/002009.html
> 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

Reply via email to