aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-11-15 05:06:35 +0000
committerDoug Evans <dje@google.com>2011-11-15 05:06:35 +0000
commited59ded5ebf4f5eb5014612020c88ebd27f0b819 (patch)
tree364c1a0084e846164c80cd0d339afcb9a5e7e209 /gdb/testsuite/gdb.base
parent81f5d455defd839446d1f1b51ed84f170b47a5c1 (diff)
downloadgdb-ed59ded5ebf4f5eb5014612020c88ebd27f0b819.zip
gdb-ed59ded5ebf4f5eb5014612020c88ebd27f0b819.tar.gz
gdb-ed59ded5ebf4f5eb5014612020c88ebd27f0b819.tar.bz2
Make "!" an alias for "shell".
* NEWS: Add mention. * cli/cli-cmds.c (init_cli_cmds): Remove xdb_commands condition on adding "!" command, always add it. * cli/cli-decode.c (find_command_name_length): Recognize "!" as a command of length one. doc/ * gdb.texinfo (Shell Commands): Document "!". testsuite/ * gdb.base/shell.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/shell.exp24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/shell.exp b/gdb/testsuite/gdb.base/shell.exp
new file mode 100644
index 0000000..ce1223d
--- /dev/null
+++ b/gdb/testsuite/gdb.base/shell.exp
@@ -0,0 +1,24 @@
+# Copyright 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that the shell and ! commands work.
+
+gdb_exit
+gdb_start
+
+gdb_test "shell echo foo" "foo"
+
+gdb_test "! echo foo" "foo"
+gdb_test "!echo foo" "foo"