report valid values for all errors for enum variables...
Daniel Jacobowitz
drow@mvista.com
Tue Oct 28 04:03:00 GMT 2003
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
More information about the Gdb-patches
mailing list