improve backtraces
authorAndy Wingo <wingo@pobox.com>
Sun, 7 Sep 2008 20:15:25 +0000 (22:15 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 7 Sep 2008 20:15:25 +0000 (22:15 +0200)
* 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

index 8014fa7..70d7d63 100644 (file)
@@ -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)
   (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))))))