[Dwarf-Discuss] Split Dwarf vs. CU DW_AT_ranges / DW_AT_low_pc placement

Mark Wielaard mark@klomp.org
Thu Mar 11 20:05:46 GMT 2021


Hi David,

On Thu, Mar 11, 2021 at 11:30:05AM -0800, David Blaikie wrote:
> > > (I went to look a bit further and GCC's .debug_loclists.dwo but it seems
> > > there's something about it that llvm-dwarfdump can't understand - it only
> > > prints a handful of rather mangled location lists... not sure which
> > > component (GCC, llvm-dwarfdump, or both) is getting things confused here
> > -
> > > oh, maybe some kind of DWARF extension for the "views" system, by the
> > looks
> > > of it)
> >
> > Yes, you might try -gno-variable-location-views or simply use binutils or
> > elfutils readelf to look at them.
> >
> 
> Thanks! - is this proposed as a DWARF extension? I thought I remembered it
> coming up, but hadn't realized how non-standard it was/that it was already
> implemented. (quick search on the issues page and I can't find any mention
> of it at least)

We kind of need a dwarf-extensions discussion list to document/discuss
these kind of non-extendable DWARF extensions. Only half kidding. Some
things in DWARF are well designed to allow vendor extensions that can
be skipped/ignored, but some aren't and we probably need to coordinate
more because it is years between standard spec releases.

Extending loclists is a bit of a pain because they aren't really
extendable. Making them extendable is
http://dwarfstd.org/ShowIssue.php?issue=170427.2 but I am still
pondering whether that really helps here because as written you can
only interpret them end of list, but not really skip them.

Location views themselves are
http://dwarfstd.org/ShowIssue.php?issue=170427.1

Alexandre Oliva, who proposed the Location Views as DWARF
extension. He has some more background material at
http://www.fsfla.org/~lxoliva/papers/sfn/ Which is mostly on variable
tracking assignments and statement frontier annotations.  Which
describes the GCC implementation that makes it possible to have
location views.

What is proposed is slightly different from what GCC currently
implements though. Caroline, Cary and I are supposed to sit down and
discuss it to see how it can be standardized. But finding time has
been tricky.

Cheers,

Mark



More information about the Dwarf-discuss mailing list