gdb: add interp::on_sync_execution_done method

Same as previous patches, but for sync_execution_done.  Except that
here, we only want to notify the interpreter that is executing the
command, not all interpreters.

Change-Id: I729c719447b5c5f29af65dbf6fed9132e2cd308b
This commit is contained in:
Simon Marchi
2023-04-20 15:47:59 -04:00
parent 2e5dbfab56
commit c3d321de3f
8 changed files with 12 additions and 28 deletions

View File

@@ -152,15 +152,9 @@ cli_interp_base::on_no_history ()
print_no_history_reason (this->interp_ui_out ());
}
/* Observer for the sync_execution_done notification. */
static void
cli_base_on_sync_execution_done ()
void
cli_interp_base::on_sync_execution_done ()
{
cli_interp_base *cli = as_cli_interp_base (top_level_interpreter ());
if (cli == nullptr)
return;
display_gdb_prompt (NULL);
}
@@ -361,8 +355,6 @@ _initialize_cli_interp ()
interp_factory_register (INTERP_CONSOLE, cli_interp_factory);
/* Note these all work for both the CLI and TUI interpreters. */
gdb::observers::sync_execution_done.attach (cli_base_on_sync_execution_done,
"cli-interp-base");
gdb::observers::command_error.attach (cli_base_on_command_error,
"cli-interp-base");
gdb::observers::user_selected_context_changed.attach