This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Use LONGEST instead of value for index arithmetic
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 26 Jun 2009 12:00:33 -0400
- Subject: Re: [rfc] Use LONGEST instead of value for index arithmetic
- References: <200906261549.n5QFn7x1026331@d12av02.megacenter.de.ibm.com>
On Fri, Jun 26, 2009 at 05:49:07PM +0200, Ulrich Weigand wrote:
> Hello,
>
> this patch implements the change I mentioned recently: use LONGEST instead
> of struct value to represent array indexes (and similarly the integer
> operands to pointer arithmetic). This has the advantage that index
> computations can be performed in host instead of target arithmetic,
> and not just eliminates a bunch of references to global built-in types,
> but makes both implementation and users of the value_subscript and
> pointer arithmetic routines quite a bit simpler.
Looks good to me. I noticed you're removing several error calls; do
those garbage cases still produce some error message? I guess they
must be untested :-(
--
Daniel Jacobowitz
CodeSourcery