On Thu, Mar 11, 2021 at 12:32 AM Jakub Jelinek <ja...@redhat.com> wrote:
> On Wed, Mar 10, 2021 at 10:07:27PM -0800, David Blaikie wrote: > > On Wed, Mar 10, 2021 at 9:38 PM Jakub Jelinek <ja...@redhat.com> wrote: > > > > > On Wed, Mar 10, 2021 at 04:12:57PM -0800, David Blaikie via > Dwarf-Discuss > > > wrote: > > > > On Wed, Mar 10, 2021 at 4:02 PM Cary Coutant <ccout...@gmail.com> > wrote: > > > > > > > > > > > So in the end the logical thing to do when encountering a > > > > > > > DW_FORM_rnglistx in a split-unit, in order to support > everybody, is > > > > > > > probably to go to the .debug_rnglists.dwo section, if there's > one, > > > > > > > disregarding the (inherited) DW_AT_rnglists_base. If there > isn't, > > > then > > > > > > > try the linked file's .debug_rnglists section, using > > > > > > > DW_AT_rnglists_base. If there isn't, then something is > malformed. > > > > > > > > > > Looks reasonable to me. I think we need a new issue to clarify > this in > > > > > DWARF 6. > > > > > > > > > > > > > Given that DWARFv5 isn't on by default in GCC yet & I think has a few > > > more > > > > > > It is on by default. But -gstrict-dwarf is not on by default. > > > > > > > Oh, it is - in a released version of the compiler, or only in > development? > > Still in development, but the prerelease already widely deployed by > multiple > Linux distributions. > > > & you're proposing changing the behavior only under -gstrict-dwarf, > rather > > than in general? Any particular reason? > > Just a typo, sorry, meant -gsplit-dwarf. > Ah, right right - I'm with you. What's your take on: 1) Fixing GDB to handle GCC's current output. 2) Fixing GCC to produce something maybe more standards conforming (to my mind, ideally: ranges on the skeleton CU (using either rnglists_base+rnglistx (like LLVM), or sec_offset (actually more compact/better than LLVM anyway, and avoids the ambiguous situation), and rnglistx in child DIEs the split full unit using using .debug_rnglists.dwo) 3) both? (so GDB can handle old GCC's output and the newer/more correct output) Personally, I'd have thought it'd be enough to move forward, change GCC and be done - but if folks would like GDB (& GDB folks are cool with it) to handle the old/weird GCC output, that's cool/up to GDB folks. Though I hope that sort of DWARF doesn't stick around long/need lots of long-lived support (I hope we don't need to add it to llvm's symbolizer for instance). - Dave
_______________________________________________ Dwarf-Discuss mailing list Dwarf-Discuss@lists.dwarfstd.org http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org