aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-09-22 20:50:52 -0600
committerTom Tromey <tom@tromey.com>2016-10-21 14:17:32 -0600
commit4b6749b9a4680e79affdb9c02ea2f5ba39a54587 (patch)
tree4036cf2242831344176ee269127a32c6718009c5 /gdb/infrun.c
parent9746809447893fd4672ea6babf4e961157cb541d (diff)
Use scoped_restore for current_ui
This changes most uses of make_cleanup_restore_current_ui to use scoped_restore. The use in switch_thru_all_uis_init still remains; that is dealt with in a later patch by replacing this iterator with a real class. 2016-10-21 Tom Tromey <tom@tromey.com> * top.c (new_ui_command, wait_sync_command_done) (gdb_readline_wrapper): Use scoped_restore. * infrun.c (fetch_inferior_event): Use scoped_restore. * infcall.c (call_thread_fsm_should_stop): Use scoped_restore.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6fc1acf77f..8d81c97a2f 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3903,8 +3903,7 @@ fetch_inferior_event (void *client_data)
/* Events are always processed with the main UI as current UI. This
way, warnings, debug output, etc. are always consistently sent to
the main console. */
- make_cleanup_restore_current_ui ();
- current_ui = main_ui;
+ scoped_restore save_ui = make_scoped_restore (&current_ui, main_ui);
/* End up with readline processing input, if necessary. */
make_cleanup (reinstall_readline_callback_handler_cleanup, NULL);