This is the mail archive of the
mailing list for the GDB project.
Re: [rfc] Use LONGEST instead of value for index arithmetic
- From: Tom Tromey <tromey at redhat dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, drow at false dot org
- Date: Fri, 26 Jun 2009 10:39:15 -0600
- Subject: Re: [rfc] Use LONGEST instead of value for index arithmetic
- References: <200906261549.n5QFn7x1026331@d12av02.megacenter.de.ibm.com>
- Reply-to: tromey at redhat dot com
>>>>> "Ulrich" == Ulrich Weigand <email@example.com> writes:
Ulrich> this patch implements the change I mentioned recently: use
Ulrich> LONGEST instead of struct value to represent array indexes
Ulrich> (and similarly the integer operands to pointer arithmetic).
Ulrich> This has the advantage that index computations can be
Ulrich> performed in host instead of target arithmetic, and not just
Ulrich> eliminates a bunch of references to global built-in types, but
Ulrich> makes both implementation and users of the value_subscript and
Ulrich> pointer arithmetic routines quite a bit simpler.
I read this patch. I agree with your assessment: it does make things
simpler. I'm in favor of it for that reason.