This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [patch] dwarf display: false (location list) in DWARF-4


On Wed, Jul 27, 2011 at 12:06:05PM +0200, Jan Kratochvil wrote:
>     <3d>   DW_AT_data_member_location: 0x1000000        (location list)
> 
> But that is wrong, DWARF-4 has DW_FORM_sec_offset for `(location list)',
> 0x1000000 is normal data (DW_FORM_data4) in DWARF-4.  There should be just:
> 
>     <3d>   DW_AT_data_member_location: 0x1000000

> 2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* dwarf.c (read_and_display_attr_value): Recognize DW_FORM_data4 and
> 	DW_FORM_data8 as location list pointers only for DWARF < 4.

Ok for trunk.

This BTW shows a gcc bug for -gdwarf-3 - the DWARF3 standard
explicitly disallows DW_FORM_data4 and DW_FORM_data8 from constant class if
the attribute has also some *ptr class (from the DWARF3 list it seems that
only DW_AT_data_member_location is affected.  In DWARF2 that wasn't a
problem, as DWARF2 didn't allow a constant for DW_AT_data_member_location.
And in DWARF4 also DW_AT_start_scope allows a constant and *ptr, but there
it should already be using DW_FORM_sec_offset for the *ptr...

	Jakub


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