[Dwarf-Discuss] PROPOSAL: Constant expressions in location lists

Chris Quenelle Chris.Quenelle@Sun.COM
Tue Jan 8 02:24:40 GMT 2008

There will normally be a huge amount of information about the type, 
but the variable itself will be represented by a single die
which references the type.  Location information on class types 
should be for the purpose of telling you how to go from the 'this'
pointer to the member data.  It wouldn't be correct to add 
location information related to specific code locations, since
different variables of the same type might have different 
location information for this kind of thing.


Michael Eager wrote:
> Chris Quenelle wrote:
>> Say you have some large and complex C++ class and a single variable
>> of that type.  Now let's say the optimizer has placed one tiny field
>> of a deeply nested inner member of that class into a register.
>> The only die is for the top-level variable.  How should the compiler
>> record that one tiny part of the overall class is now in a register?
> Unless I've misunderstood you, DWARF can describe this currently.
> The location list for the member points to the register and gives
> the scope where this is valid.
> I'm not sure what you mean by having only the DIE for the "top-level
> variable".  If you mean that the DWARF only contains a DW_TAG_class_type
> without any of the specification for the members, then this would not
> be well formed.

More information about the Dwarf-discuss mailing list