This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Support constant DW_AT_data_member_location by GCC PR debug/40659
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 14 Aug 2009 14:58:52 -0600
- Subject: Re: [patch] Support constant DW_AT_data_member_location by GCC PR debug/40659
- References: <20090811195300.GA12898@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> 2009-08-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan> Support constant DW_AT_data_member_location by GCC PR debug/40659.
Jan> * dwarf2read.c (dwarf2_get_attr_constant_value): Prototype now uses
Jan> CORE_ADDR.
Jan> (dwarf2_add_field, dwarf2_add_member_fn, read_common_block): Use
Jan> dwarf2_get_attr_constant_value.
Jan> (read_subrange_type, read_subrange_type): Add new parameter to the
Jan> dwarf2_get_attr_constant_value call.
Jan> (dwarf2_get_ref_die_offset): Fix the return value comment. Change the
Jan> function data type INT to CORE_ADDR. Support also attr_form_is_block.
I think this looks pretty good but I do have one comment.
Jan> - if (attr_form_is_section_offset (attr))
Jan> - {
Jan> - dwarf2_complex_location_expr_complaint ();
Jan> - byte_offset = 0;
IIUC the patch still will issue a complaint for this construct, but now
it just issues a more generic one from dwarf2_get_attr_constant_value.
What about putting the more specific checks into that function instead?
Would it cause some problem?
If not, please do it. If so, don't bother, I think this is ok.
Tom