From 4d23a063c8059a5141da8d829b77a277b77827da Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 28 Sep 1999 21:51:51 +0000 Subject: import gdb-1999-09-28 snapshot --- gdb/utils.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index feba7647701..60015016ee9 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -84,6 +84,8 @@ static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; /* Pointer to what is left to do for an execution command after the target stops. Used only in asynchronous mode, by targets that @@ -181,6 +183,14 @@ make_exec_cleanup (function, arg) return make_my_cleanup (&exec_cleanup_chain, function, arg); } +struct cleanup * +make_exec_error_cleanup (function, arg) + void (*function) PARAMS ((PTR)); + PTR arg; +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + static void do_freeargv (arg) void *arg; @@ -244,6 +254,13 @@ do_exec_cleanups (old_chain) do_my_cleanups (&exec_cleanup_chain, old_chain); } +void +do_exec_error_cleanups (old_chain) + register struct cleanup *old_chain; +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + void do_my_cleanups (pmy_chain, old_chain) register struct cleanup **pmy_chain; @@ -275,6 +292,13 @@ discard_final_cleanups (old_chain) discard_my_cleanups (&final_cleanup_chain, old_chain); } +void +discard_exec_error_cleanups (old_chain) + register struct cleanup *old_chain; +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + void discard_my_cleanups (pmy_chain, old_chain) register struct cleanup **pmy_chain; @@ -1487,7 +1511,7 @@ prompt_for_continue () ++p; if (p[0] == 'q') { - if (!async_p) + if (!event_loop_p) request_quit (SIGINT); else async_request_quit (0); -- cgit v1.2.1