aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2023-04-20 15:47:59 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-05-30 15:07:26 -0400
commitc3d321de3f35dc67d7eb0826e6cc8bc1f22a91e6 (patch)
tree0022bf493c246e39ead67332820e9f609b39bcdd /gdb/cli
parent2e5dbfab563c58b9be34d168e8aaa24878aab38c (diff)
downloadgdb-c3d321de3f35dc67d7eb0826e6cc8bc1f22a91e6.zip
gdb-c3d321de3f35dc67d7eb0826e6cc8bc1f22a91e6.tar.gz
gdb-c3d321de3f35dc67d7eb0826e6cc8bc1f22a91e6.tar.bz2
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
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-interp.c12
-rw-r--r--gdb/cli/cli-interp.h1
2 files changed, 3 insertions, 10 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 98bc203..0031054 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -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
diff --git a/gdb/cli/cli-interp.h b/gdb/cli/cli-interp.h
index 7fc22a0..4680c80 100644
--- a/gdb/cli/cli-interp.h
+++ b/gdb/cli/cli-interp.h
@@ -38,6 +38,7 @@ public:
void on_normal_stop (bpstat *bs, int print_frame) override;
void on_exited (int status) override;
void on_no_history () override;
+ void on_sync_execution_done () override;
private:
struct saved_output_files