This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] DW_AT_byte_size for array type entries
- From: Ken Werner <ken at linux dot vnet dot ibm dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 14 Dec 2010 11:27:43 +0100
- Subject: Re: [patch] DW_AT_byte_size for array type entries
- References: <201010191323.57251.ken@linux.vnet.ibm.com> <201012132103.09320.ken@linux.vnet.ibm.com> <20101214054150.GJ2596@adacore.com>
On Tuesday, December 14, 2010 6:41:50 am Joel Brobecker wrote:
> > 2010-12-13 Ken Werner <ken.werner@de.ibm.com>
> >
> > * valops.c (value_one): Use get_array_bounds to compute the number
> > of array elements instead of dividing the length of the array by the
> > length of the element types.
> > * valarith.c (value_complement, value_neg): Likewise.
>
> This is OK.
Patch committed:
http://sourceware.org/ml/gdb-cvs/2010-12/msg00063.html
> As a followup patch, how about defining a new function `get_array_length'
> next to get_array_bounds? That way, you can factorize of this code that
> keeps being repeated...
Ok.
Regards
Ken