mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-04 05:48:20 +08:00
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.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2019-08-21 Bogdan Harjoc <harjoc@gmail.com>
|
||||||
|
|
||||||
|
* cli/cli-cmds.c (with_command_1): Error out if no arguments.
|
||||||
|
|
||||||
2019-08-21 Christian Biesinger <cbiesinger@google.com>
|
2019-08-21 Christian Biesinger <cbiesinger@google.com>
|
||||||
|
|
||||||
* tui/tui-data.h (tui_gen_win_info): Add an =default
|
* tui/tui-data.h (tui_gen_win_info): Add an =default
|
||||||
|
@ -217,6 +217,9 @@ void
|
|||||||
with_command_1 (const char *set_cmd_prefix,
|
with_command_1 (const char *set_cmd_prefix,
|
||||||
cmd_list_element *setlist, const char *args, int from_tty)
|
cmd_list_element *setlist, const char *args, int from_tty)
|
||||||
{
|
{
|
||||||
|
if (args == nullptr)
|
||||||
|
error (_("Missing arguments."));
|
||||||
|
|
||||||
const char *delim = strstr (args, "--");
|
const char *delim = strstr (args, "--");
|
||||||
const char *nested_cmd = nullptr;
|
const char *nested_cmd = nullptr;
|
||||||
|
|
||||||
|
@ -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>
|
2019-08-21 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
* gdb.base/gdb-caching-proc.exp: Sort files.
|
* gdb.base/gdb-caching-proc.exp: Sort files.
|
||||||
|
@ -220,6 +220,8 @@ with_test_prefix "run control" {
|
|||||||
|
|
||||||
# Check errors.
|
# Check errors.
|
||||||
with_test_prefix "errors" {
|
with_test_prefix "errors" {
|
||||||
|
gdb_test "with" "Missing arguments\\."
|
||||||
|
|
||||||
# Try both an unknown root setting and an unknown prefixed
|
# Try both an unknown root setting and an unknown prefixed
|
||||||
# setting. The errors come from different locations in the
|
# setting. The errors come from different locations in the
|
||||||
# sources.
|
# sources.
|
||||||
|
Reference in New Issue
Block a user