aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.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/infcall.c
parent9746809447893fd4672ea6babf4e961157cb541d (diff)
downloadgdb-4b6749b9a4680e79affdb9c02ea2f5ba39a54587.zip
gdb-4b6749b9a4680e79affdb9c02ea2f5ba39a54587.tar.gz
gdb-4b6749b9a4680e79affdb9c02ea2f5ba39a54587.tar.bz2
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/infcall.c')
-rw-r--r--gdb/infcall.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index ab7426d..e435cf7 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -519,8 +519,6 @@ call_thread_fsm_should_stop (struct thread_fsm *self,
if (stop_stack_dummy == STOP_STACK_DUMMY)
{
- struct cleanup *old_chain;
-
/* Done. */
thread_fsm_set_finished (self);
@@ -530,13 +528,9 @@ call_thread_fsm_should_stop (struct thread_fsm *self,
f->return_value = get_call_return_value (&f->return_meta_info);
/* Break out of wait_sync_command_done. */
- old_chain = make_cleanup_restore_current_ui ();
- current_ui = f->waiting_ui;
+ scoped_restore save_ui = make_scoped_restore (&current_ui, f->waiting_ui);
target_terminal_ours ();
f->waiting_ui->prompt_state = PROMPT_NEEDED;
-
- /* This restores the previous UI. */
- do_cleanups (old_chain);
}
return 1;