summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-24 16:06:47 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-24 16:06:47 -0800
commit3fdecca05ea781c592d5acf0c3610f3a2be31706 (patch)
treec1f418de2b697ef64cffbd5c8c45adca80797cbf /debug.c
parent96bb428fb9d47b332f5c2e979af76e8c2ee75d0e (diff)
downloadtxr-3fdecca05ea781c592d5acf0c3610f3a2be31706.tar.gz
txr-3fdecca05ea781c592d5acf0c3610f3a2be31706.tar.bz2
txr-3fdecca05ea781c592d5acf0c3610f3a2be31706.zip
* debug.c (debug): Use new way of getting line number.
* eval.c (eval_error): Use source_loc_str to get source location. * match.c (debuglf, sem_err, file_err): Likewise. * parser.h (source_loc_str): Declared. * parser.l (parse_init): form_to_ln_hash must be equal based now. * parser.y (rl): Store new form of read-time source location info. * txr.1: Documented load.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 175dc5b7..5aa2728d 100644
--- a/debug.c
+++ b/debug.c
@@ -60,7 +60,7 @@ static void show_bindings(val env, val stream)
val debug(val form, val bindings, val data, val line, val pos, val base)
{
uses_or2;
- val lineno = source_loc(form);
+ val lineno = car(source_loc(form));
if (!step_mode && !memqual(lineno, breakpoints)
&& (debug_depth > next_depth))
@@ -74,7 +74,7 @@ val debug(val form, val bindings, val data, val line, val pos, val base)
val input, command;
if (print_form) {
- format(std_output, lit("stopped at line ~a\n"), lineno, nao);
+ format(std_output, lit("stopped at ~a\n"), source_loc_str(form), nao);
format(std_output, lit("form: ~s\n"), form, nao);
format(std_output, lit("depth: ~s\n"), num(debug_depth), nao);
print_form = nil;