aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
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/guile
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/guile')
-rw-r--r--gdb/guile/scm-ports.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/guile/scm-ports.c b/gdb/guile/scm-ports.c
index 78187c4..a7c0bd4 100644
--- a/gdb/guile/scm-ports.c
+++ b/gdb/guile/scm-ports.c
@@ -461,7 +461,6 @@ static SCM
ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport,
const char *func_name)
{
- struct cleanup *cleanups;
SCM result;
SCM_ASSERT_TYPE (gdbscm_is_true (scm_output_port_p (port)), port,
@@ -469,7 +468,7 @@ ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport,
SCM_ASSERT_TYPE (gdbscm_is_true (scm_thunk_p (thunk)), thunk,
SCM_ARG2, func_name, _("thunk"));
- cleanups = set_batch_flag_and_make_cleanup_restore_page_info ();
+ set_batch_flag_and_restore_page_info save_page_info;
scoped_restore restore_async = make_scoped_restore (&current_ui->async, 0);
@@ -493,8 +492,6 @@ ioscm_with_output_to_port_worker (SCM port, SCM thunk, enum oport oport,
result = gdbscm_safe_call_0 (thunk, NULL);
}
- do_cleanups (cleanups);
-
if (gdbscm_is_exception (result))
gdbscm_throw (result);