This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] print arrays with indexes
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 3 Oct 2005 14:23:41 -0700
- Subject: Re: [RFA] print arrays with indexes
- References: <u64svim4h.fsf@gnu.org> <20050920193132.GY2496@adacore.com> <20050920193339.GA28294@nevyn.them.org> <20050920193918.GB10186@adacore.com> <20050922164622.GF5841@adacore.com> <20050926012259.GA22284@nevyn.them.org> <20050927010420.GW922@adacore.com> <20051002224218.GA3083@nevyn.them.org> <20051003061733.GL938@adacore.com> <20051003155019.GA23854@nevyn.them.org>
> A comment would be nice. With that change, the patch (and testcase and
> docs) are OK.
Thank you. Here is the comment I added:
Computing the array lower bound is pretty easy, but this function
does some additional verifications before returning the low bound.
If something incorrect is detected, it is better to return a status
rather than throwing an error, making it easier for the caller to
implement an error-recovery plan. For instance, it may decide to
warn the user that the bound was not found and then use a default
value instead. */
It occurs to me that we might eventually want to move this function
somewhere more general, add a parameter for the upper bound, and use
it everywhere... Some thoughts for a rainy day...
Patch checked in.
Currently working on the testcase and doc.
Thanks,
--
Joel