[Dwarf-Discuss] Attribute DW_AT_location has form DW_FORM_sdata?
louzonr at yahoo.com
Tue Oct 4 12:34:18 PDT 2011
Since dwarf_loclist_n() already supports DW_FORM_data4 and DW_FORM_data8, is there any plan to update it in a future release to accomodate DW_FORM_sdata?
Thanks for the help with this.
From: David Anderson <davea42 at earthlink.net>
To: dwarf-discuss at lists.dwarfstd.org
Sent: Tuesday, October 4, 2011 3:08 PM
Subject: Re: [Dwarf-Discuss] Attribute DW_AT_location has form DW_FORM_sdata?
On 10/04/2011 11:03 AM, Ron Louzon wrote:
> In the past, when dealing with structure and class members, I have always been able to use the dwarf_loclist() and dwarf_loclist_n() functions to retrieve location information for the members. These functions would return the offset which was applicable for whatever member was being examined. With the GNU 4.4 compiler, these functions are returning an error because the DW_AT_data_member_location attribute is of the form DW_FORM_sdata and these functions do not handle that attribute form.
> I have never encountered this before. I can deal with this by reading the data as a signed number but is this normal? Do I always need to examine the form type to determine how to deal with a DW_AT_data_member_location attribute or is this a special case due to abnormal output from the GNU 4.4 compiler?
I added support (June 2011 I think) to dwarfdump
for an arbitrary constant as the value of DW_AT_data_member_location
and I seem to recall this was exactly because of gcc and DW_FORM_sdata on
DW_AT_data_member_location. The signed constant kind of surprised me too.
-- I have a rock garden. Last week three of them died. -- Richard Diran
Dwarf-Discuss mailing list
Dwarf-Discuss at lists.dwarfstd.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dwarf-Discuss