From: Tom Tromey Date: Mon, 1 May 2017 03:04:51 +0000 (-0600) Subject: Remove in_user_command X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=898e0c8e879394ce0fb8a08fe85929a29f3ce55b;p=binutils-gdb.git Remove in_user_command While working on the next patch in this series, I found that the global in_user_command is not used. This patch removes it. (I didn't think to check Insight until submitting this series; and it's not very convenient to do so, so if someone has it checked out and could look at it, that would be nice.) ChangeLog 2017-08-03 Tom Tromey * top.h (in_user_command): Remove. * top.c (in_user_command): Remove. * cli/cli-script.c (do_restore_user_call_depth) (execute_user_command): Update. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59556b407d3..f7ccc82fa1a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2017-08-03 Tom Tromey + + * top.h (in_user_command): Remove. + * top.c (in_user_command): Remove. + * cli/cli-script.c (do_restore_user_call_depth) + (execute_user_command): Update. + 2017-08-03 Tom Tromey * valops.c (search_struct_method): Use gdb::byte_vector. diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index a6d54566973..527540a201d 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -379,8 +379,6 @@ do_restore_user_call_depth (void * call_depth) int *depth = (int *) call_depth; (*depth)--; - if ((*depth) == 0) - in_user_command = 0; } @@ -411,10 +409,6 @@ execute_user_command (struct cmd_list_element *c, char *args) make_cleanup (do_restore_instream_cleanup, ui->instream); ui->instream = NULL; - /* Also set the global in_user_command, so that NULL instream is - not confused with Insight. */ - in_user_command = 1; - scoped_restore save_async = make_scoped_restore (¤t_ui->async, 0); command_nest_depth++; diff --git a/gdb/top.c b/gdb/top.c index 2504eb6e5f8..43bf0d42d41 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -129,10 +129,6 @@ show_confirm (struct ui_file *file, int from_tty, value); } -/* Flag to indicate whether a user defined command is currently running. */ - -int in_user_command; - /* Current working directory. */ char *current_directory; diff --git a/gdb/top.h b/gdb/top.h index 452a3819514..5d7cb1f8108 100644 --- a/gdb/top.h +++ b/gdb/top.h @@ -218,7 +218,6 @@ extern void ui_unregister_input_event_handler (struct ui *ui); /* From top.c. */ extern char *saved_command_line; -extern int in_user_command; extern int confirm; extern char gdb_dirbuf[1024]; extern int inhibit_gdbinit;