mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
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.
This commit is contained in:
@@ -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 (¤t_ui, main_ui);
|
||||
|
||||
/* End up with readline processing input, if necessary. */
|
||||
make_cleanup (reinstall_readline_callback_handler_cleanup, NULL);
|
||||
|
||||
Reference in New Issue
Block a user