From bf9e4d0c1f88710c2a389bf4b1bdf1d0d83fa7f4 Mon Sep 17 00:00:00 2001 From: Muhammad Bilal Date: Wed, 24 Apr 2013 14:29:17 +0000 Subject: 2013-04-24 Muhammad Bilal PR gdb/10462 * cli/cli-decode.c (lookup_command): Show an error if there is no space before argument. 2013-04-24 Muhammad Bilal PR gdb/10462 * gdb.base/setshow.exp: Add test case. --- gdb/cli/cli-decode.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/cli/cli-decode.c') diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index 9bc14b5..2fdd9e4 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1556,6 +1556,9 @@ lookup_cmd (const char **line, struct cmd_list_element *list, char *cmdtype, } else { + if (c->type == set_cmd && **line != '\0' && !isspace (**line)) + error (_("Argument must be preceded by space.")); + /* We've got something. It may still not be what the caller wants (if this command *needs* a subcommand). */ while (**line == ' ' || **line == '\t') -- cgit v1.1