diff options
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-script.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 2d1afe5..c94f7ee 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -317,13 +317,13 @@ execute_user_command (struct cmd_list_element *c, char *args) static int user_call_depth = 0; extern int max_user_call_depth; - old_chain = setup_user_args (args); - cmdlines = c->user_commands; if (cmdlines == 0) /* Null command */ return; + old_chain = setup_user_args (args); + if (++user_call_depth > max_user_call_depth) error (_("Max user call depth exceeded -- command aborted.")); |