summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-07 06:41:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-07 06:41:10 -0700
commit723f24a59ba019cd2974efdcea731c6d9ca65842 (patch)
treeb0f1690f491041edbca9ba8ef6bb2f052a8831fb /debug.c
parenta6c599aea98cc588f1cdebac89e844b1b36f4c38 (diff)
downloadtxr-723f24a59ba019cd2974efdcea731c6d9ca65842.tar.gz
txr-723f24a59ba019cd2974efdcea731c6d9ca65842.tar.bz2
txr-723f24a59ba019cd2974efdcea731c6d9ca65842.zip
Change to different exception for debugger quit.
* debug.c (debug_quit_s): New global variable. (debug): Throw debug-quit, not query-error. (debug_init): Initialize debug_quit_s.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index e0429421..54052eef 100644
--- a/debug.c
+++ b/debug.c
@@ -51,6 +51,8 @@ static val breakpoints;
static val last_command;
static int cols = 80;
+val debug_quit_s;
+
/* C99 inline instantiations. */
#if __STDC_VERSION__ >= 199901L
val debug_check(val form, val bindings, val data, val line,
@@ -230,7 +232,7 @@ val debug(val form, val bindings, val data, val line, val pos, val base)
}
}
} else if (equal(command, lit("q"))) {
- uw_throwf(query_error_s, lit("terminated via debugger"), nao);
+ uw_throwf(debug_quit_s, lit("terminated via debugger"), nao);
} else {
format(std_debug, lit("unrecognized command: ~a\n"), command, nao);
}
@@ -258,6 +260,7 @@ void debug_init(void)
{
step_mode = 1;
protect(&breakpoints, &last_command, convert(val *, 0));
+ debug_quit_s = intern(lit("debug-quit"), user_package);
{
char *columns = getenv("COLUMNS");
if (columns)