1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-04 03:00:20 +02:00

* debug.scm (frame-number->index): Optionally take stack as

argument.
This commit is contained in:
Mikael Djurfeldt 1999-09-11 18:28:12 +00:00
parent 0c76ebbd1f
commit 6de43e5fda

View file

@ -25,10 +25,13 @@
;;; {Misc}
;;;
(define-public (frame-number->index n)
(if (memq 'backwards (debug-options))
n
(- (stack-length (fluid-ref the-last-stack)) n 1)))
(define-public (frame-number->index n . stack)
(let ((stack (if (null? stack)
(fluid-ref the-last-stack)
(car stack))))
(if (memq 'backwards (debug-options))
n
(- (stack-length stack) n 1))))
;;; {Trace}