Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] print arrays with indexes
Date: Mon, 26 Sep 2005 01:23:00 -0000	[thread overview]
Message-ID: <20050926012259.GA22284@nevyn.them.org> (raw)
In-Reply-To: <20050922164622.GF5841@adacore.com>

On Thu, Sep 22, 2005 at 09:46:22AM -0700, Joel Brobecker wrote:
> > This sounds good to me too. Perhaps a compromise between what Eli
> > suggested and what you have been suggesting would work. How about
> > we implement a on/off knob for now. Later on, if we understand better
> > in which direction to use the threshold, then we can enhance the knob
> > to include "auto", and then have a second knob.
> > 
> > As long as we cross-reference each setting in the help text, I think
> > users won't be confused.
> 
> No objection to the above, so far... Fingers crossed.
> 
> Would you know, it just occured to me that the above is what my last
> patch actually implemented :). Assuming this intermediate approach is
> ok, I'm resubmitting that patch again.
> 
> Note that the patch was first submitted in:
> 
>         http://sources.redhat.com/ml/gdb-patches/2005-09/msg00047.html

This looks OK to me, with documentation and tests.  Minor comments:

- Reading the diff it's apparent that there is some space vs tabs
confusion in the Ada changes.  I prefer tabs, but not violently so;
however, I mostly prefer that code match its surroundings.  Otherwise
indentation in diffs looks very odd.

>  /*  Called by various <lang>_val_print routines to print elements of an
>     array in the form "<elem1>, <elem2>, <elem3>, ...".
>  
> +   Some languages such as Ada allow the user to specify arrays where
> +   the index of the first element is not zero. REAL_INDEX_OFFSET is
> +   the user-level index of the first element of the array. For many
> +   languages such as C or C++, it is always zero.
> +

Ada is by no means the only language with this feature - namely,
Fortran.  Can't you compute this value from the array type, instead
of passing it in from Ada-specific code?  I couldn't see any obvious
reasons why not.

> +/* Assuming TYPE is a simple, non-empty array type, compute the lower
> +   bound and the array index type.  Save the low bound into LOW_BOUND
> +   if not NULL.  Save the index type in INDEX_TYPE if not NULL.
> +
> +   Return 1 if the operation was successful. Return zero otherwise,
> +   in which case the value of LOW_BOUND and INDEX_TYPE is undefined.  */

s/undefined/unmodified/, since you rely on it below.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-09-26  1:23 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 20:20 [RFC/RFA] " Joel Brobecker
2005-09-06 20:57 ` Daniel Jacobowitz
2005-09-07  5:40   ` Joel Brobecker
2005-09-07 13:23     ` Daniel Jacobowitz
2005-09-07 20:24       ` Joel Brobecker
2005-09-14 17:13         ` [RFA] " Joel Brobecker
2005-09-17 20:49           ` Daniel Jacobowitz
2005-09-17 21:51             ` Joel Brobecker
2005-09-17 22:07               ` Daniel Jacobowitz
2005-09-18  3:37               ` Eli Zaretskii
2005-09-18  3:46                 ` Daniel Jacobowitz
2005-09-18  5:41                   ` Joel Brobecker
2005-09-18 19:08                     ` Eli Zaretskii
2005-09-18 19:19                       ` Daniel Jacobowitz
2005-09-18 20:05                         ` Eli Zaretskii
2005-09-20  7:31                           ` Joel Brobecker
2005-09-20 19:18                             ` Eli Zaretskii
2005-09-20 19:31                               ` Joel Brobecker
2005-09-20 19:33                                 ` Daniel Jacobowitz
2005-09-20 19:39                                   ` Joel Brobecker
2005-09-21  3:44                                     ` Eli Zaretskii
2005-09-22 16:47                                     ` Joel Brobecker
2005-09-26  1:23                                       ` Daniel Jacobowitz [this message]
2005-09-27  1:04                                         ` Joel Brobecker
2005-10-02 22:42                                           ` Daniel Jacobowitz
2005-10-03  6:17                                             ` Joel Brobecker
2005-10-03 15:50                                               ` Daniel Jacobowitz
2005-10-03 21:23                                                 ` Joel Brobecker
2005-10-04  7:02                                               ` Joel Brobecker
2005-10-04  7:41                                                 ` Joel Brobecker
2005-09-21  3:44                                 ` Eli Zaretskii
2005-09-18  8:53                 ` Mark Kettenis
2005-09-18 19:10                   ` Eli Zaretskii
2005-09-07 20:39       ` [RFC/RFA] " Jim Blandy
2005-09-07 21:41         ` Joel Brobecker
2005-09-09 19:14           ` Jim Blandy
2005-09-06 21:45 ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050926012259.GA22284@nevyn.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox