From 6328eb3805da75d26e17c13c7be09123d2ce9dc1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 19 Apr 2012 20:18:26 +0000 Subject: [PATCH] * top.c (quit_target): Use all_cleanups. * main.c (captured_command_loop): Use all_cleanups. * exceptions.c (throw_exception): Use all_cleanups. --- gdb/ChangeLog | 6 ++++++ gdb/exceptions.c | 2 +- gdb/main.c | 2 +- gdb/top.c | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 73ae3b4d3df..521940c8b71 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-04-19 Tom Tromey + + * top.c (quit_target): Use all_cleanups. + * main.c (captured_command_loop): Use all_cleanups. + * exceptions.c (throw_exception): Use all_cleanups. + 2012-04-19 Pedro Alves * Makefile.in (GNULIB_BUILDDIR): New. diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 0dcad71d20b..7db9df9eb80 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -224,7 +224,7 @@ throw_exception (struct gdb_exception exception) quit_flag = 0; immediate_quit = 0; - do_cleanups (ALL_CLEANUPS); + do_cleanups (all_cleanups ()); /* Jump to the containing catch_errors() call, communicating REASON to that call via setjmp's return value. Note that REASON can't diff --git a/gdb/main.c b/gdb/main.c index fe41551d947..3148d72da29 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -231,7 +231,7 @@ captured_command_loop (void *data) are not that well behaved. do_cleanups should either be replaced with a do_cleanups call (to cover the problem) or an assertion check to detect bad FUNCs code. */ - do_cleanups (ALL_CLEANUPS); + do_cleanups (all_cleanups ()); /* If the command_loop returned, normally (rather than threw an error) we try to quit. If the quit is aborted, catch_errors() which called this catch the signal and restart the command diff --git a/gdb/top.c b/gdb/top.c index 55e4504009a..a138480e5e4 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1297,8 +1297,8 @@ quit_target (void *arg) if (write_history_p && history_filename) write_history (history_filename); - do_final_cleanups (ALL_CLEANUPS); /* Do any final cleanups before - exiting. */ + do_final_cleanups (all_cleanups ()); /* Do any final cleanups before + exiting. */ return 0; } -- 2.30.2