X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fcli%2Fcli-setshow.c;h=86ebed45a4a14cc4ae1b97272c8854d1d60316cc;hb=48c410fb70fe09c036e27092880db687e5c2fb0b;hp=96d7bf5c3c0bb05534c0dcc864745a7c20af1b63;hpb=93bcb04349eb500781747a542ececc7a8ba3bd95;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 96d7bf5c3c..86ebed45a4 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;