[PATCH] Ignore DWARF debug information for -gsplit-dwarf with dwarf-5.
Jan Beulich
jbeulich@suse.com
Thu Sep 29 16:03:14 GMT 2022
On 29.09.2022 17:54, Potharla, Rupesh wrote:
> .debug_info contents:
> 0x00000000: Compile Unit: length = 0x00000031, format = DWARF32, version = 0x0005, unit_type = DW_UT_skeleton, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = 0xcd97775ca070a83c (next unit at 0x00000035)
>
> The issue is seen with both clang and gcc. Above is the Debug_info header of a program compiled with gcc using -gsplit-dwarf and dwarf-5.
> There are two other fields(abbr_offset and addr_Size) after unit_type in the header. Skipping the dwo_id field in the previous check of unit_type will not fix the issue.
According to the doc I'm looking at the headers for DW_UT_type and
DW_UT_skeleton agree up to the debug_abbrev_offset field. This
matches the code, which reads addr_size and abbrev_offset ahead of
the DW_UT_type conditional I was talking about. What's between that
if() and the one you're adding in your present patch is _precessing_
of addr_size, but not fetching of it from the header. This is
supported by the intermediate code also not further touching
info_ptr.
Jan
More information about the Binutils
mailing list