This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simple struct member offset doesn't need a full dwarf location expression


On 07/07/2009 10:09 AM, Mark Wielaard wrote:
Hi,

As explained in PR40659 a simple struct member offset doesn't need a
full dwarf location expression, but can just encode the
DW_AT_data_member_location as a constant offset according to the Dwarf
standard. This saves a little space (one byte per struct field member)
and is slightly simpler to handle for debuginfo consumers. It is also
the recommended way to encode this according to the examples in the
Dwarf standard appendix.

This is true for dwarf3 only.


For dwarf2, section 7.5.4 figure 18 specifies that DW_AT_d_m_l is only valid with block/reference forms. Which suggests we want to emit this only when dwarf_version > 2.


r~



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]