1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

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.
This commit is contained in:
Andy Wingo 2008-09-07 22:15:25 +02:00
parent ee79dfab3d
commit b5c46470a5

View 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)
@ -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))))))