On 2021-03-10 10:59 a.m., Jakub Jelinek via Dwarf-Discuss wrote:> Hi! > > We got a report today that GCC even for -gdwarf-5 -gsplit-dwarf uses > .debug_rnglists section + DW_AT_ranges + DW_AT_low_pc + DW_AT_rnglists_base > attributes in the DW_TAG_skeleton_unit (and then some DW_AT_ranges in > .debug_info.dwo that use DW_FORM_rnglistx, but no .debug_rnglists.dwo > section). That is the same spot where > the DWARF 4 split DWARF extension was using, but the .debug_ranges > section wasn't really placeable into dwo files. > So, my first question is whether that is really invalid DWARF 5 or not. > > LLVM seems to emit instead: > .debug_rnglists section + DW_AT_ranges + DW_AT_low_pc + DW_AT_rnglists_base > attributes in the DW_TAG_skeleton_unit (but .debug_rnglists only contains > the ranges for the whole CU) and then > .debug_rnglistsx.dwo section and DW_AT_ranges in .debug_info.dwo (not on the > DW_TAG_compile_unit though) that refer to that. > > Would it be ok to emit only DW_AT_low_pc in DW_TAG_skeleton_unit and > .debug_rnglists.dwo section and DW_AT_ranges (but not DW_AT_rnglists_base) > in DW_TAG_compile_unit? I mean, is there any benefit in having the CU > ranges on the skeleton over .debug_info.dwo? Do split debug info consumers > need to essentially merge the attributes from the skeleton unit and > corresponding compile unit?
Just for the record, I think I stumbled on those differences earlier when fixing GDB consuming clang's DWARF 5 range lists. I asked on the gdb-patches list: https://sourceware.org/pipermail/gdb-patches/2020-November/173053.html Mark Wielaard's opinion was that both ways were valid. I'll follow the discussions here to see if the community settles on another interpretation. Simon _______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org