aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1999-09-28 21:55:21 +0000
committerJason Molenda <jmolenda@apple.com>1999-09-28 21:55:21 +0000
commit6426a772a2645ef6afa596319dba0ff966bff050 (patch)
tree315b42018fc08aad8fc85d0833b1ed983d747de8 /gdb/utils.c
parentf4bda9848fb4c4ae3e4cccba77d5ef26099e451e (diff)
downloadgdb-6426a772a2645ef6afa596319dba0ff966bff050.zip
gdb-6426a772a2645ef6afa596319dba0ff966bff050.tar.gz
gdb-6426a772a2645ef6afa596319dba0ff966bff050.tar.bz2
import gdb-1999-09-28 snapshot
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index feba764..6001501 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;
@@ -245,6 +255,13 @@ do_exec_cleanups (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;
register struct cleanup *old_chain;
@@ -276,6 +293,13 @@ discard_final_cleanups (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;
register struct cleanup *old_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);