summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-01-21 17:26:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-01-21 17:26:53 -0800
commite2118a041353a9d85e1c56051335f8ac0df101fd (patch)
treef4501d9a9f82eba38a75e4f9f666e46a659c61d0 /debug.c
parent0cbd46033d0ef707a856c78e735dbf41a6fd7faa (diff)
downloadtxr-e2118a041353a9d85e1c56051335f8ac0df101fd.tar.gz
txr-e2118a041353a9d85e1c56051335f8ac0df101fd.tar.bz2
txr-e2118a041353a9d85e1c56051335f8ac0df101fd.zip
* debug.c (help): Added missing help for w command.
(debug): In backtrace, show the renaming pairs for unbound variables (up_p_a_pairs) if they are present. * debug.h (debug_begin): Renamed to debug_frame. * eval.c (eval): Wrap debug_begin/debug_end around function dispatch, so TXR Lisp functions are included in backtraces. * match.c (h_fun): Follow rename of debug_begin to debug_frame. Pass in evaluated args, not the original ones. (v_fun): Likewise. * unwind.c (uw_push_debug): bindings argument renamed to env. Bugfix: args argument was being assigned to ub_p_a_pairs. * unwind.h (struct uw_debug): Member bindings renamed to env. (uw_push_debug): Declaration updated.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index bad1c1d5..f7b74642 100644
--- a/debug.c
+++ b/debug.c
@@ -31,7 +31,8 @@ static void help(val stream)
"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"));
+ "d - delete breakpoint w - backtrace\n"
+ "l - list breakpoints\n"));
}
static void show_bindings(val env, val stream)
@@ -143,7 +144,12 @@ val debug(val form, val bindings, val data, val line, val chr)
for (iter = uw_current_frame(); iter != 0; iter = iter->uw.up) {
if (iter->uw.type == UW_DBG) {
- format(std_output, lit("(~s ~s)\n"), iter->db.func, iter->db.args, nao);
+ if (iter->db.ub_p_a_pairs)
+ format(std_output, lit("(~s ~s ~s)\n"), iter->db.func,
+ iter->db.args, iter->db.ub_p_a_pairs, nao);
+ else
+ format(std_output, lit("(~s ~s)\n"), iter->db.func,
+ iter->db.args, nao);
}
}
}