diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-07 06:41:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-07 06:41:10 -0700 |
commit | 723f24a59ba019cd2974efdcea731c6d9ca65842 (patch) | |
tree | b0f1690f491041edbca9ba8ef6bb2f052a8831fb | |
parent | a6c599aea98cc588f1cdebac89e844b1b36f4c38 (diff) | |
download | txr-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.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | debug.c | 5 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,11 @@ +2015-08-07 Kaz Kylheku <kaz@kylheku.com> + + 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. + 2015-08-06 Kaz Kylheku <kaz@kylheku.com> * debug.c (help): Rearrange menu. Show missing quit command. @@ -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) |