This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: report valid values for all errors for enum variables...
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 27 Oct 2003 23:03:47 -0500
- Subject: Re: report valid values for all errors for enum variables...
- References: <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