aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2019-08-21 21:11:33 +0100
committerPedro Alves <palves@redhat.com>2019-08-21 21:11:33 +0100
commit26c957f12762816a90d5145c7c527ca48c890855 (patch)
treee3e0b88cba61e55a95d287efa7af5c086c77910a /gdb/testsuite
parentc07aae6e727ca8ae2b3ef123d920b7cef2aff8c6 (diff)
downloadgdb-26c957f12762816a90d5145c7c527ca48c890855.zip
gdb-26c957f12762816a90d5145c7c527ca48c890855.tar.gz
gdb-26c957f12762816a90d5145c7c527ca48c890855.tar.bz2
Fix nullptr in with_command_1
Running 'with' without arguments crashes GDB. This fixes it. gdb/ChangeLog: 2019-08-21 Bogdan Harjoc <harjoc@gmail.com> * cli/cli-cmds.c (with_command_1): Error out if no arguments. gdb/testsuite/ChangeLog: 2019-08-21 Pedro Alves <palves@redhat.com> * gdb.base/with.exp: Test "with" with no arguments.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/with.exp2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 7fea9cd..e56cc16 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2019-08-21 Pedro Alves <palves@redhat.com>
+
+ * gdb.base/with.exp: Test "with" with no arguments.
+
2019-08-21 Tom de Vries <tdevries@suse.de>
* gdb.base/gdb-caching-proc.exp: Sort files.
diff --git a/gdb/testsuite/gdb.base/with.exp b/gdb/testsuite/gdb.base/with.exp
index 9ea7685..a972296 100644
--- a/gdb/testsuite/gdb.base/with.exp
+++ b/gdb/testsuite/gdb.base/with.exp
@@ -220,6 +220,8 @@ with_test_prefix "run control" {
# Check errors.
with_test_prefix "errors" {
+ gdb_test "with" "Missing arguments\\."
+
# Try both an unknown root setting and an unknown prefixed
# setting. The errors come from different locations in the
# sources.