From: Daniel Jacobowitz <drow@false.org>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: Nick Roberts <nickrob@snap.net.nz>, gdb-patches@sourceware.org
Subject: Re: [Patch] -var-evaluate-expression NAME [FORMAT]
Date: Tue, 29 Jan 2008 21:45:00 -0000 [thread overview]
Message-ID: <20080129214347.GC15063@caradoc.them.org> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA04290E63@ecamlmw720.eamcs.ericsson.se>
On Thu, Jan 24, 2008 at 04:35:37PM -0500, Marc Khouzam wrote:
> New version based on comments.
> This patch also includes tests and documentation update.
> I ran regression and got no failure in the new tests
> that I added.
>
> Comments?
This looks basically OK to me. Just minor comments.
> +extern char *varobj_get_formatted_value (struct varobj *var,
> + enum varobj_display_formats format);
You've almost got GNU indentation style, but not quite. We replace
leading eight space sequences with tabs, and parameters should line
up. Of course that doesn't quite fit here, so some rule has to bend;
it doesn't really matter which, but please use the tabs.
> +struct cleanup_set_format_struct
> +{
> + struct varobj *var;
> + enum varobj_display_formats format;
> +};
Two space indent there.
> + varobj_set_display_format (cleanup_struct->var,
> + cleanup_struct->format);
These don't line up - I suspect a different tab width somewhere along
the line?
> Index: gdb/doc/gdb.texinfo
> ===================================================================
> RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
> retrieving revision 1.459
> diff -u -r1.459 gdb.texinfo
> --- gdb/doc/gdb.texinfo 23 Jan 2008 11:26:29 -0000 1.459
> +++ gdb/doc/gdb.texinfo 24 Jan 2008 21:26:46 -0000
> @@ -19995,12 +19995,16 @@
> @subsubheading Synopsis
>
> @smallexample
> - -var-evaluate-expression @var{name}
> + -var-evaluate-expression @var{name} [-f @var{format-spec}]
> @end smallexample
The grammar for MI commands says options always come first. They're
optional, anyway, so how about -var-evaluate-expression [-f
@var{format-spec}] @var{name}?
> Index: gdb/mi/mi-cmd-var.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mi/mi-cmd-var.c,v
> retrieving revision 1.44
> diff -u -r1.44 mi-cmd-var.c
> --- gdb/mi/mi-cmd-var.c 23 Jan 2008 06:13:44 -0000 1.44
> +++ gdb/mi/mi-cmd-var.c 24 Jan 2008 21:26:46 -0000
> @@ -28,6 +28,7 @@
> #include "value.h"
> #include <ctype.h>
> #include "gdb_string.h"
> +#include "mi-getopt.h"
>
> const char mi_no_values[] = "--no-values";
> const char mi_simple_values[] = "--simple-values";
Yes, we do live in the distant past. If you add a #include, you have
to manually update gdb/Makefile.in. Maybe this year we'll get
automatic dependencies.
> + switch ((enum opt) opt)
> + {
> + case OP_FORMAT:
> + if (formatFound)
> + error (_("mi_cmd_var_evaluate_expression: cannot specify format more than once"));
> +
> + format = mi_parse_format (optarg);
> + formatFound = 1;
> + break;
> + }
Funny indentation again.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-01-29 21:44 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 20:38 Marc Khouzam
2008-01-23 3:04 ` Nick Roberts
2008-01-23 14:30 ` Marc Khouzam
2008-01-23 14:42 ` Daniel Jacobowitz
2008-01-23 17:04 ` Marc Khouzam
2008-01-23 22:09 ` Nick Roberts
2008-01-24 21:36 ` Marc Khouzam
2008-01-25 9:59 ` Eli Zaretskii
2008-01-29 21:45 ` Daniel Jacobowitz [this message]
2008-02-01 19:23 ` Marc Khouzam
2008-02-02 10:31 ` Eli Zaretskii
2008-02-03 19:43 ` Marc Khouzam
2008-02-03 20:01 ` Eli Zaretskii
2008-02-04 14:17 ` Marc Khouzam
2008-02-04 21:00 ` Eli Zaretskii
2008-02-02 11:20 ` Vladimir Prus
2008-02-03 19:55 ` Marc Khouzam
2008-02-03 20:42 ` Joel Brobecker
2008-02-03 21:41 ` Daniel Jacobowitz
2008-02-03 21:46 ` Daniel Jacobowitz
2008-02-04 17:00 ` Marc Khouzam
2008-02-04 17:02 ` Marc Khouzam
2008-02-04 21:40 ` Nick Roberts
2008-02-04 21:53 ` Nick Roberts
2008-02-05 14:47 ` Marc Khouzam
2008-02-05 20:43 ` Nick Roberts
2008-02-05 20:55 ` Marc Khouzam
2008-02-05 21:18 ` Nick Roberts
2008-02-04 17:11 ` Marc Khouzam
2008-01-23 3:48 ` Daniel Jacobowitz
2008-01-23 14:44 ` Marc Khouzam
2008-01-28 14:41 Marc Khouzam
2008-01-28 14:48 ` Daniel Jacobowitz
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=20080129214347.GC15063@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=marc.khouzam@ericsson.com \
--cc=nickrob@snap.net.nz \
/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