diff options
Diffstat (limited to 'gnu/usr.bin/binutils/gdb')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/command.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/command.c b/gnu/usr.bin/binutils/gdb/command.c index c3c2b98a974..b0b945881e1 100644 --- a/gnu/usr.bin/binutils/gdb/command.c +++ b/gnu/usr.bin/binutils/gdb/command.c @@ -1233,6 +1233,21 @@ do_setshow_command (arg, from_tty, c) char *match; char *p; + if (arg == NULL) + { + char msg[1024]; + strlcpy(msg, "Requires an argument. Valid arguments are ", + sizeof msg); + for (i = 0; c->enums[i]; i++) + { + if (i != 0) + strlcat(msg, ", ", sizeof msg); + strlcat(msg, c->enums[i], sizeof msg); + } + strlcat(msg, ".", sizeof msg); + error("%s", msg); + } + p = strchr (arg, ' '); if (p) |