This is the mail archive of the
mailing list for the binutils project.
Re: [patch] dwarf display: false (location list) in DWARF-4
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 27 Jul 2011 18:28:54 +0200
- Subject: Re: [patch] dwarf display: false (location list) in DWARF-4
- References: <20110727100605.GA17872@host1.jankratochvil.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <firstname.lastname@example.org>
> * 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...