summaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-09-28 21:51:51 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-09-28 21:51:51 +0000
commit4d23a063c8059a5141da8d829b77a277b77827da (patch)
treee3e93e7d27dd21c002e1eab3ee100bfb829ad016 /gdb/utils.c
parentd9a03198266d6194588df6cadc75dd25c0d23305 (diff)
downloadgdb-4d23a063c8059a5141da8d829b77a277b77827da.tar.gz
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 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;
@@ -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);