diff options
Diffstat (limited to 'gdb/cli/cli-interp.c')
-rw-r--r-- | gdb/cli/cli-interp.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index aba73f1..6cb315c 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -140,19 +140,10 @@ cli_interp_base::on_signal_exited (gdb_signal sig) print_signal_exited_reason (this->interp_ui_out (), sig); } -/* Observer for the exited notification. */ - -static void -cli_base_on_exited (int exitstatus) +void +cli_interp_base::on_exited (int status) { - SWITCH_THRU_ALL_UIS () - { - cli_interp_base *cli = as_cli_interp_base (top_level_interpreter ()); - if (cli == nullptr) - continue; - - print_exited_reason (cli->interp_ui_out (), exitstatus); - } + print_exited_reason (this->interp_ui_out (), status); } /* Observer for the no_history notification. */ @@ -379,7 +370,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::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, "cli-interp-base"); |