From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: report valid values for all errors for enum variables...
Date: Tue, 28 Oct 2003 04:03:00 -0000 [thread overview]
Message-ID: <20031028040347.GA26218@nevyn.them.org> (raw)
In-Reply-To: <F620E205-08EA-11D8-A22C-000A958F4C44@apple.com>
On Mon, Oct 27, 2003 at 06:03:45PM -0800, Jim Ingham wrote:
> Hi, all...
>
> The set command for "var_enum" type gdb variables will give you a
> helpful error message if you say something like:
>
> (gdb) set osabi
> Requires an argument. Valid arguments are auto, default, none, Darwin,
> Darwin64.
>
> But not if you do:
>
> (gdb) set osabi Blubby
> Undefined item: "Blubby"
>
> It would be nice if folks didn't have to remember that osabi is an enum
> type variable, and they should go back and type "set osabi" with no
> arguments, etc. The following patch makes it symmetrical, so you get:
>
> (top-gdb) set osabi
> Requires an argument. Valid values are auto, default, none, Darwin,
> Darwin64.
> (top-gdb) set osabi foobar
> Undefined item: "foobar". Valid values are auto, default, none, Darwin,
> Darwin64.
> (top-gdb) set osabi Darw
> Ambiguous item "Darw". Valid values are auto, default, none, Darwin,
> Darwin64.
>
> Does this seem good?
>
> 2003-10-27 Jim Ingham <jingham@apple.com>
>
> * cli/cli-setshow.c (do_setshow_command): For var_enum type
> variables,
> return the list of valid values for all errors, not just no argument.
>
I like it. In fact, I really, really, really like it :)
This is OK.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-10-28 4:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 2:02 Jim Ingham
2003-10-28 4:03 ` Daniel Jacobowitz [this message]
2003-10-28 16:08 ` Andrew Cagney
2003-10-28 19:35 ` Jim Ingham
2003-10-29 15:15 ` Andrew Cagney
2003-10-29 19:03 ` Jim Ingham
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=20031028040347.GA26218@nevyn.them.org \
--to=drow@mvista.com \
--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