From b5c46470a54349a583022cfeb82e7f4f2ce28aba Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 7 Sep 2008 22:15:25 +0200 Subject: [PATCH] improve backtraces * module/system/vm/frame.scm (frame-call-representation): Show more of lists. (program-name): Avoid a traceback if (frame-address link) is #f. Not sure when this can happen, but it does, and since this is already in the backtrace function, there be badness there. --- module/system/vm/frame.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/system/vm/frame.scm b/module/system/vm/frame.scm index 8014fa77c..70d7d6341 100644 --- a/module/system/vm/frame.scm +++ b/module/system/vm/frame.scm @@ -93,7 +93,7 @@ (define (frame-call-representation frame) (define (abbrev x) (cond ((list? x) - (if (> (length x) 3) + (if (> (length x) 4) (list (abbrev (car x)) (abbrev (cadr x)) '...) (map abbrev x))) ((pair? x) @@ -124,7 +124,7 @@ (let ((prog (frame-program frame)) (link (frame-dynamic-link frame))) (or (object-property prog 'name) - (and (heap-frame? link) + (and (heap-frame? link) (frame-address link) (frame-object-name link (1- (frame-address link)) prog)) (hash-fold (lambda (s v d) (if (eq? prog (variable-ref v)) s d)) prog (module-obarray (current-module))))))