This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Support constant DW_AT_data_member_location by GCC PR debug/40659


>>>>> "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


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