[Dwarf-Discuss] Attribute DW_AT_location has form DW_FORM_sdata?

Jakub Jelinek jakub@redhat.com
Tue Oct 4 19:17:31 GMT 2011


On Tue, Oct 04, 2011 at 02:56:16PM -0400, Ron Brender wrote:
> The option to use DW_FORM_sdata in the DW_AT_location attribute of a
> field is new in DWARF *V4*. It is a size optimization for the very
> common case where the field offset is a constant. (Otherwise, an
> address expression is required which is at least a couple bytes
> larger.) I would expect that dwarf_loclist() and dwarf_loclist_n()
> already must use the form in order to distinguish a simple
> expression versus a location list--handling the sdata case should be
> a minor extension.

It is already in DWARF *V3* actually.  Just in *V3* DW_FORM_data{4,8}
on DW_AT_data_member_location has to be considered as loclistptr,
while in *V4* it is constant offset too.

	Jakub




More information about the Dwarf-discuss mailing list