From: Simon Marchi Date: Wed, 6 Sep 2023 19:29:09 +0000 (-0400) Subject: gdb: remove interp_pre_command_loop X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bec941b342c86dcb61d017d988166ed7a68aba34;p=binutils-gdb.git gdb: remove interp_pre_command_loop It is a trivial wrapper around the pre_command_loop method, remove it. Change-Id: Idb2c61f9b68988528006a9a9b2b528f43781eef4 Approved-By: Tom Tromey --- diff --git a/gdb/interps.c b/gdb/interps.c index 7baa8491eb1..fa294dfa1a3 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -262,16 +262,6 @@ command_interp (void) return current_ui->current_interpreter; } -/* See interps.h. */ - -void -interp_pre_command_loop (struct interp *interp) -{ - gdb_assert (interp != NULL); - - interp->pre_command_loop (); -} - /* See interp.h */ int diff --git a/gdb/interps.h b/gdb/interps.h index c041d0d95b6..95a885d1b69 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -261,10 +261,6 @@ extern void clear_interpreter_hooks (void); if it uses GDB's own simplified form of readline. */ extern int interp_supports_command_editing (struct interp *interp); -/* Called before starting an event loop, to give the interpreter a - chance to e.g., print a prompt. */ -extern void interp_pre_command_loop (struct interp *interp); - /* List the possible interpreters which could complete the given text. */ extern void interpreter_completer (struct cmd_list_element *ignore, diff --git a/gdb/main.c b/gdb/main.c index 3e93f583947..cf46f6acb20 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -470,7 +470,7 @@ captured_command_loop () /* Give the interpreter a chance to print a prompt, if necessary */ if (ui->prompt_state != PROMPT_BLOCKED) - interp_pre_command_loop (top_level_interpreter ()); + top_level_interpreter ()->pre_command_loop (); /* Now it's time to start the event loop. */ start_event_loop (); diff --git a/gdb/ui.c b/gdb/ui.c index 5fe001262a8..38ec61ea673 100644 --- a/gdb/ui.c +++ b/gdb/ui.c @@ -227,7 +227,7 @@ new_ui_command (const char *args, int from_tty) set_top_level_interpreter (interpreter_name); - interp_pre_command_loop (top_level_interpreter ()); + top_level_interpreter ()->pre_command_loop (); /* Make sure the file is not closed. */ stream.release ();