aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-09-29 22:07:37 -0600
committerTom Tromey <tom@tromey.com>2017-10-03 05:33:45 -0600
commitb95de2b7aeb30081345954cb15970a582b49a866 (patch)
treeb562ca7cca16ad171cf074074b89e11311970216 /gdb/top.c
parent070365117b5727394e271399c5738a27bf9716d5 (diff)
downloadgdb-b95de2b7aeb30081345954cb15970a582b49a866.zip
gdb-b95de2b7aeb30081345954cb15970a582b49a866.tar.gz
gdb-b95de2b7aeb30081345954cb15970a582b49a866.tar.bz2
Remove set_batch_flag_and_make_cleanup_restore_page_info
This removes set_batch_flag_and_make_cleanup_restore_page_info and make_cleanup_restore_page_info in favor of a new RAII class. This then allows for the removal of make_cleanup_restore_uinteger and make_cleanup_restore_integer ChangeLog 2017-10-03 Tom Tromey <tom@tromey.com> * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update. * top.c (execute_command_to_string): Update. * utils.c (make_cleanup_restore_page_info): Remove. (do_restore_page_info_cleanup): Remove. (set_batch_flag_and_restore_page_info): New. (make_cleanup_restore_page_info): Remove. (set_batch_flag_and_make_cleanup_restore_page_info): Remove. (~set_batch_flag_and_restore_page_info): New (make_cleanup_restore_uinteger): Remove. (make_cleanup_restore_integer): Remove. (struct restore_integer_closure): Remove. (restore_integer): Remove. * utils.h (struct set_batch_flag_and_restore_page_info): New class. (set_batch_flag_and_make_cleanup_restore_page_info): Remove. (make_cleanup_restore_page_info): Remove. (make_cleanup_restore_uinteger) Remove. (make_cleanup_restore_integer) Remove.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 4fc987c..56117a3 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -666,11 +666,9 @@ execute_command (char *p, int from_tty)
std::string
execute_command_to_string (char *p, int from_tty)
{
- struct cleanup *cleanup;
-
/* GDB_STDOUT should be better already restored during these
restoration callbacks. */
- cleanup = set_batch_flag_and_make_cleanup_restore_page_info ();
+ set_batch_flag_and_restore_page_info save_page_info;
scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
@@ -694,8 +692,6 @@ execute_command_to_string (char *p, int from_tty)
execute_command (p, from_tty);
}
- do_cleanups (cleanup);
-
return std::move (str_file.string ());
}