mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-28 14:08:09 +08:00
gdb/
* cli/cli-script.c (insert_args): Handle NULL user_args. gdb/testsuite/ * gdb.base/commands.exp (stray_arg0_test): New test.
This commit is contained in:
@ -593,6 +593,11 @@ insert_args (char *line)
|
||||
char *p, *save_line, *new_line;
|
||||
unsigned len, i;
|
||||
|
||||
/* If we are not in a user-defined function, treat $argc, $arg0, et
|
||||
cetera as normal convenience variables. */
|
||||
if (user_args == NULL)
|
||||
return xstrdup (line);
|
||||
|
||||
/* First we need to know how much memory to allocate for the new line. */
|
||||
save_line = line;
|
||||
len = 0;
|
||||
|
Reference in New Issue
Block a user