diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-04-20 14:02:28 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-05-30 15:07:26 -0400 |
commit | d6bd2ef5f4c2027a68810f4a9dbe871b61e819ab (patch) | |
tree | 28be60b8ea2a22e80e492ce3bf329ee3c7261954 /gdb/cli/cli-interp.c | |
parent | 8782926771b1212acb90b944f7402466c998d592 (diff) | |
download | gdb-d6bd2ef5f4c2027a68810f4a9dbe871b61e819ab.zip gdb-d6bd2ef5f4c2027a68810f4a9dbe871b61e819ab.tar.gz gdb-d6bd2ef5f4c2027a68810f4a9dbe871b61e819ab.tar.bz2 |
gdb: add interp::on_signal_exited method
Same as previous patch, but for signal_exited. Remove the signal_exited
observable, since nothing uses it anymore, and we don't have anything
coming that will use it.
Change-Id: I0dca1eab76338bf27be755786e3dad3241698b10
Diffstat (limited to 'gdb/cli/cli-interp.c')
-rw-r--r-- | gdb/cli/cli-interp.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 9508171..aba73f1 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -134,19 +134,10 @@ cli_interp_base::on_signal_received (enum gdb_signal siggnal) print_signal_received_reason (this->interp_ui_out (), siggnal); } -/* Observer for the signalled notification. */ - -static void -cli_base_on_signal_exited (enum gdb_signal siggnal) +void +cli_interp_base::on_signal_exited (gdb_signal sig) { - SWITCH_THRU_ALL_UIS () - { - cli_interp_base *cli = as_cli_interp_base (top_level_interpreter ()); - if (cli == nullptr) - continue; - - print_signal_exited_reason (cli->interp_ui_out (), siggnal); - } + print_signal_exited_reason (this->interp_ui_out (), sig); } /* Observer for the exited notification. */ @@ -388,8 +379,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::signal_exited.attach (cli_base_on_signal_exited, - "cli-interp-base"); gdb::observers::exited.attach (cli_base_on_exited, "cli-interp-base"); gdb::observers::no_history.attach (cli_base_on_no_history, "cli-interp-base"); gdb::observers::sync_execution_done.attach (cli_base_on_sync_execution_done, |