[Dwarf-Discuss] question about [0x0..0xffffffff] location list entry
Thu Jan 20 19:11:49 GMT 2011
Joel Brobecker wrote:
>> The correct LocList for this variable would be [0..0xffffffff].
> I am just a little confused by your last sentence. In offsets,
> in the debug_loc section, are 0..0xffffffff, but once we add
> the base address, we get the strange empty range. GDB treated
> that range as empty, so were we correct? If we were, out of curiosity,
> how would one get the LocList above?
I had some second thoughts about this after I sent the email.
The end offset should be the highest address where the address
is valid, perhaps the end of the compilation unit.
To again quote the DWARF 4 standard:
2.6.2 Location Lists
Location lists are used in place of location expressions
whenever the object whose location is being described can
change location during its lifetime.
Since there is no intent that the object's location can change
during it's lifetime, use of a location list is inappropriate.
As this paragraph suggests, and as Roland said, a location
expression should be used when the location of an object
does not change during it's lifetime.
Michael Eager eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Dwarf-discuss