This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Handle DW_TAG_subrange_type
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: Elena Zannoni <ezannoni at redhat dot com>, schwab at suse dot de,gdb-patches at sources dot redhat dot com
- Date: Thu, 15 Jan 2004 12:10:02 -0500
- Subject: Re: [PATCH] Handle DW_TAG_subrange_type
- References: <16381.59531.51774.449779@localhost.redhat.com><20040114172803.GO4978@gnat.com>
Joel Brobecker writes:
> Hello Helena,
>
> > I agree that the subrange type should be handled in more places, so ok
> > with Joel's calls for that.
> >
> > Almost identical code is in read_array_type. Would it be possible to
> > unify that as well into a single function read_subrange_type? I.e. do
> > you think that that "else if (attr->form == DW_FORM_block1)" clause
> > will interfere with the ADA case? If not and we can unify them, then,
> > I'd prefer the version that Andreas has, since it handles the default
> > high and low, not as -1, but the same as the original code.
>
> Here is a revised patch, which I hope addresses all your comments.
> Tested on x86-linux, using gcc HEAD. No regression.
>
> I should also mention that I am about to send a patch to gcc-patches,
> which slightly modifies the dwarf-2 output, and will likely cause GCC
> to generate more of these subrange_type DIEs. It is more a cleanup
> patch than anything else, but I did verify that GDB together with the
> attached patch handle the new GCC without trouble.
>
> 2004-01-14 J. Brobecker <brobecker@gnat.com>
>
> * dwarf2read.c (dwarf2_non_const_array_bound_ignored_complaint):
> Delete, no longer used.
> (read_subrange_type): New function, mostly extracted from
> read_array_type().
> (read_array_type): Replace extracted code by call to
> read_subrange_type().
> (dwarf2_get_attr_constant_value): New function.
> (scan_partial_symbols): Add handling for DW_TAG_subrange_type.
> (add_partial_symbol): Likewise.
> (process_die): Likewise.
> (new_symbol): Likewise.
> (read_type_die): Likewise.
>
> OK to apply?
sure
elena