Fix nullptr in with_command_1
authorPedro Alves <palves@redhat.com>
Wed, 21 Aug 2019 20:11:33 +0000 (21:11 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 21 Aug 2019 20:11:33 +0000 (21:11 +0100)
commit26c957f12762816a90d5145c7c527ca48c890855
treee3e0b88cba61e55a95d287efa7af5c086c77910a
parentc07aae6e727ca8ae2b3ef123d920b7cef2aff8c6
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.
gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/with.exp