summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-01-21 10:58:50 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-01-21 10:58:50 -0800
commitd4d41b4ec3f983ad0fa42f8e85a2c68d207a9b28 (patch)
treed4c22f7c06cdb64772ffe58b7e0bccb0ae3c4822 /debug.c
parent66ab83b942d8f0f6a4c27f171b361e08680f5a34 (diff)
downloadtxr-d4d41b4ec3f983ad0fa42f8e85a2c68d207a9b28.tar.gz
txr-d4d41b4ec3f983ad0fa42f8e85a2c68d207a9b28.tar.bz2
txr-d4d41b4ec3f983ad0fa42f8e85a2c68d207a9b28.zip
* debug.c (help): Filled in.
(debug): Some commands changed due to duplicates.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c18
1 files changed, 13 insertions, 5 deletions
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)) {