This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] print arrays with indexes


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]