diff options
author | Tom Tromey <tom@tromey.com> | 2016-09-24 21:53:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2016-10-21 14:17:36 -0600 |
commit | 67ad9399e2a69757f06886ee61ce7f36d15e768a (patch) | |
tree | 2892071556a11ba6021980c45359b3a97965dee3 /gdb/ui-out.c | |
parent | d1e4a624699fd734b3b6e87fb79a4da71c182dfd (diff) | |
download | fsf-binutils-gdb-67ad9399e2a69757f06886ee61ce7f36d15e768a.zip fsf-binutils-gdb-67ad9399e2a69757f06886ee61ce7f36d15e768a.tar.gz fsf-binutils-gdb-67ad9399e2a69757f06886ee61ce7f36d15e768a.tar.bz2 |
Remove make_cleanup_restore_current_uiout
This removes make_cleanup_restore_current_uiout in favor of an
RAII-based class.
2016-10-21 Tom Tromey <tom@tromey.com>
* stack.c (print_stack_frame_to_uiout): Use scoped_restore.
* ui-out.c (make_cleanup_restore_current_uiout)
(restore_current_uiout_cleanup): Remove.
* infrun.c (print_stop_event): Use scoped_restore.
* ui-out.h (make_cleanup_restore_current_uiout): Don't declare.
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r-- | gdb/ui-out.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c index f6d6050..932cf12 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -952,24 +952,6 @@ ui_out_destroy (struct ui_out *uiout) xfree (uiout); } -/* Cleanup that restores a previous current uiout. */ - -static void -restore_current_uiout_cleanup (void *arg) -{ - struct ui_out *saved_uiout = (struct ui_out *) arg; - - current_uiout = saved_uiout; -} - -/* See ui-out.h. */ - -struct cleanup * -make_cleanup_restore_current_uiout (void) -{ - return make_cleanup (restore_current_uiout_cleanup, current_uiout); -} - /* Standard gdb initialization hook. */ void |