diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-setshow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 96d7bf5..86ebed4 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -413,6 +413,10 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) if (nmatches > 1) error (_("Ambiguous item \"%s\"."), arg); + const char *after = skip_spaces (arg + len); + if (*after != '\0') + error (_("Junk after item \"%.*s\": %s"), len, arg, after); + if (*(const char **) c->var != match) { *(const char **) c->var = match; |