diff options
author | Tom Tromey <tom@tromey.com> | 2017-08-13 10:47:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-09-09 13:46:08 -0600 |
commit | ca5909c7de7353d8005bf8fdcc020b8f14cc1603 (patch) | |
tree | 7f6a92c8c64d4154b16b8a30d6bd7fdde6fe19f3 /gdb/mi | |
parent | e6a2252ac3e3dc748df33b38ac66cd78c80be5ad (diff) | |
download | gdb-ca5909c7de7353d8005bf8fdcc020b8f14cc1603.zip gdb-ca5909c7de7353d8005bf8fdcc020b8f14cc1603.tar.gz gdb-ca5909c7de7353d8005bf8fdcc020b8f14cc1603.tar.bz2 |
Remove make_cleanup_ui_out_redirect_pop
This patch introduces ui_out_redirect_pop. All uses of
make_cleanup_ui_out_redirect_pop are replaced with this new class.
ChangeLog
2017-09-09 Tom Tromey <tom@tromey.com>
* mi/mi-interp.c (mi_user_selected_context_changed): Use
ui_out_redirect_pop.
* guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
ui_out_redirect_pop.
* utils.c (do_ui_out_redirect_pop)
(make_cleanup_ui_out_redirect_pop): Remove.
* top.c (execute_command_to_string): Use ui_out_redirect_pop.
* utils.h (make_cleanup_ui_out_redirect_pop): Remove.
* ui-out.h (ui_out_redirect_pop): New class.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-interp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index ca8ff14..f96c59a 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -1314,10 +1314,9 @@ mi_user_selected_context_changed (user_selected_what selection) mi_uiout = interp_ui_out (top_level_interpreter ()); mi_uiout->redirect (mi->event_channel); + ui_out_redirect_pop redirect_popper (mi_uiout); - old_chain = make_cleanup_ui_out_redirect_pop (mi_uiout); - - make_cleanup_restore_target_terminal (); + old_chain = make_cleanup_restore_target_terminal (); target_terminal_ours_for_output (); if (selection & USER_SELECTED_INFERIOR) |