[Dwarf-Discuss] Default Location List Entry Issue 130121.1

Michael Eager eager at eagerm.com
Tue Apr 8 07:58:00 PDT 2014


On 04/08/14 01:39, Mark Wielaard wrote:

> Of course it doesn't need to use a DW_AT_start_scope, it can also use a
> location list, generate an extra narrower lexical block that owns the
> data object DIE, or maybe not generate any of that at all. The point was
> that the intention of what the valid ranges of the default entry are in
> cases when such attributes are generated are clearly documented.

There is no relationship between scope and the address ranges in a
location expression or location list.

If you persist in confabulating that these interact in ways which are
not described in the DWARF specification, you will continue to make
incorrect assumptions.

>> One may assume that debugger developers have an understanding of the
>> calling sequence for a function and that they are aware that locations
>> which are described as being on a stack frame are not valid until the
>> frame is created.
>
> It is not just when the stack frame is created but also when which stack
> slots are seeded with the actual values (and a compiler using shrink
> wrapping might sprinkle the frame setup and allocations throughout the
> function). That is precisely why a DWARF producer can use attributes
> like DW_AT_start_scope, use an lexical block with narrower scope or use
> location lists to indicate over which address range a location
> expression is valid. I just want to make it clear how these attributes,
> when used by a producer to guide a consumer, interact with the default
> entry proposal.

Scope defines where a name is known withing a program and what object
it is bound to:  http://en.wikipedia.org/wiki/Scope_%28computer_science%29

There is no interaction between scope and lifetime of an object in DWARF.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Dwarf-Discuss mailing list