This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
report valid values for all errors for enum variables...
- From: Jim Ingham <jingham at apple dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 27 Oct 2003 18:03:45 -0800
- Subject: report valid values for all errors for enum variables...
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.
Attachment:
var_enum.patch
Description: Binary data
Jim
--
Jim Ingham jingham@apple.com
Developer Tools
Apple Computer