[Dwarf-Discuss] Default Location List Entry Issue 130121.1
mjw at redhat.com
Thu Apr 24 01:30:59 PDT 2014
On Wed, 2014-04-23 at 08:49 -0400, Frank Ch. Eigler wrote:
> Hi -
> On Wed, Apr 23, 2014 at 01:46:30PM +0200, Mark Wielaard wrote:
> > [...]
> > > > So if a producer wants to take advantage of a default location list
> > > > entry to encode a smaller location list for an object, then how should
> > > > it present to the consumer the same "not available" information?
> > >
> > > I think that this is an unusual situation. Can you describe when this
> > > might be the case?
> > I think it is not such an uncommon situation. When a compiler inlines
> > part of a function somewhere else that often seems to create interesting
> > ranges and locations. [...]
> It sounds like the situation for gcc's -g -O0 (unoptimized) case,
> where a default location is emitted for a variable DIEs, but that
> location is only valid/accurate outside the prologue/epiogue areas.
> (The pc-address ranges of those areas are not noted in DWARF, and this
> requires consumers like gdb & systemtap to employ heuristics.)
Yes, it is a bit like that. Except since a default entry is used in a
location list there are also valid ranges that don't need any
heuristics. And for the consumer it might not be clear whether to use
any heuristics or whether they can just rely on complete information
provided by the producer using fixups to indicate the invalid ranges
like suggested by Michael. The trick is to make sure producers and
consumers agree on the interpretation of the valid ranges.
More information about the Dwarf-Discuss