summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--debug.c18
2 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c2f93173..46385737 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-01-21 Kaz Kylheku <kaz@kylheku.com>
+ * debug.c (help): Filled in.
+ (debug): Some commands changed due to duplicates.
+
+2012-01-21 Kaz Kylheku <kaz@kylheku.com>
+
* match.c (v_fun): Removing all debugging instrumentation.
(match_files): Moving debug_check out of directive case so
it covers all forms handled by loop. All this makes the n
diff --git a/debug.c b/debug.c
index c6b97537..ce8109e4 100644
--- a/debug.c
+++ b/debug.c
@@ -22,8 +22,16 @@ static int next_depth = -1;
val breakpoints;
val last_command = lit("");
-static void help(void)
+static void help(val stream)
{
+ put_string(stream,
+ lit("commands:\n"
+ "? - help s - step into form\n"
+ "h - help n - step over form\n"
+ "c - continue f - finish form\n"
+ "v - show variable binding environment s - show current form\n"
+ "b - set breakpoint by line number i - show current data\n"
+ "d - delete breakpoint l - list breakpoints\n"));
}
static void show_bindings(val env, val stream)
@@ -91,8 +99,8 @@ val debug(val form, val bindings, val data, val line, val chr)
last_command, first(input));
last_command = command;
- if (equal(command, lit("?")) || equal(command, lit("help"))) {
- help();
+ if (equal(command, lit("?")) || equal(command, lit("h"))) {
+ help(std_output);
continue;
} else if (equal(command, null_string)) {
continue;
@@ -113,9 +121,9 @@ val debug(val form, val bindings, val data, val line, val chr)
return nil;
} else if (equal(command, lit("v"))) {
show_bindings(bindings, std_output);
- } else if (equal(command, lit("i"))) {
+ } else if (equal(command, lit("s"))) {
print_form = t;
- } else if (equal(command, lit("d"))) {
+ } else if (equal(command, lit("i"))) {
print_data = t;
} else if (equal(command, lit("b")) || equal(command, lit("d"))) {
if (!rest(input)) {