diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2023-04-28 14:55:18 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-05-30 15:07:26 -0400 |
commit | 2736b77153629619fe75071356e16d9db51606ff (patch) | |
tree | 0fb4dded5c12a31a6ede897d0cf8b2ed4a30a616 /gdb/mi/mi-interp.c | |
parent | c3d321de3f35dc67d7eb0826e6cc8bc1f22a91e6 (diff) | |
download | gdb-2736b77153629619fe75071356e16d9db51606ff.zip gdb-2736b77153629619fe75071356e16d9db51606ff.tar.gz gdb-2736b77153629619fe75071356e16d9db51606ff.tar.bz2 |
gdb: add interp::on_command_error method
Same idea as the previous patches, but for command_error.
Change-Id: If6098225dd72fad8be13b3023b35bc8bc48efb9d
Diffstat (limited to 'gdb/mi/mi-interp.c')
-rw-r--r-- | gdb/mi/mi-interp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 1cc0a6a..313d751 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -104,14 +104,10 @@ as_mi_interp (struct interp *interp) return dynamic_cast<mi_interp *> (interp); } -/* Observer for the command_error notification. */ - -static void -mi_on_command_error () +void +mi_interp::on_command_error () { - mi_interp *mi = as_mi_interp (top_level_interpreter ()); - if (mi != nullptr) - display_mi_prompt (mi); + display_mi_prompt (this); } void @@ -1237,7 +1233,6 @@ _initialize_mi_interp () "mi-interp"); gdb::observers::command_param_changed.attach (mi_command_param_changed, "mi-interp"); - gdb::observers::command_error.attach (mi_on_command_error, "mi-interp"); gdb::observers::memory_changed.attach (mi_memory_changed, "mi-interp"); gdb::observers::user_selected_context_changed.attach (mi_user_selected_context_changed, "mi-interp"); |