diff options
author | Muhammad Bilal <mbilal@sourceware.org> | 2013-04-24 14:29:17 +0000 |
---|---|---|
committer | Muhammad Bilal <mbilal@sourceware.org> | 2013-04-24 14:29:17 +0000 |
commit | bf9e4d0c1f88710c2a389bf4b1bdf1d0d83fa7f4 (patch) | |
tree | 23d70aeb0bcb8238e01dd4cdd79c9b198a7d7353 /gdb | |
parent | ad83dabf1c9d2fa1f8e228ffb7db60ff25d63937 (diff) | |
download | gdb-bf9e4d0c1f88710c2a389bf4b1bdf1d0d83fa7f4.zip gdb-bf9e4d0c1f88710c2a389bf4b1bdf1d0d83fa7f4.tar.gz gdb-bf9e4d0c1f88710c2a389bf4b1bdf1d0d83fa7f4.tar.bz2 |
2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
PR gdb/10462
* cli/cli-decode.c (lookup_command): Show an error if there is no space
before argument.
2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
PR gdb/10462
* gdb.base/setshow.exp: Add test case.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/cli/cli-decode.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/setshow.exp | 7 |
4 files changed, 21 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 228afcb..ba963e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-04-24 Muhammad Bilal <mbilal@codesourcery.com> + + PR gdb/10462 + * cli/cli-decode.c (lookup_command): Show an error if there is no space + before argument. + 2013-04-23 Tom Tromey <tromey@redhat.com> * common/filestuff.c: Check USE_WIN32API before including 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') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index df72053..62f8f27 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-04-24 Muhammad Bilal <mbilal@codesourcery.com> + + PR gdb/10462 + * gdb.base/setshow.exp: Add test case. + 2013-04-23 Hui Zhu <hui@codesourcery.com> PR gdb/15293 diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index d33d6c7..c78d2df 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -259,3 +259,10 @@ gdb_test "show verbose" "Verbose printing of informational messages is on..*" "s gdb_test_no_output "set verbose off" "set verbose off" #test show verbose off gdb_test "show verbose" "Verbosity is off..*" "show verbose (off)" +#test argument must be preceded by space +foreach x {"history file" "solib-search-path" "data-directory"} { + foreach y {"/home/" "." "~/home" "=home"} { + gdb_test "set $x$y" "Argument must be preceded by space." \ + "$x is not set to $y" + } +} |