1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 19:50:23 +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} ;;; {Misc}
;;; ;;;
(define-public (frame-number->index n) (define-public (frame-number->index n . stack)
(if (memq 'backwards (debug-options)) (let ((stack (if (null? stack)
n (fluid-ref the-last-stack)
(- (stack-length (fluid-ref the-last-stack)) n 1))) (car stack))))
(if (memq 'backwards (debug-options))
n
(- (stack-length stack) n 1))))
;;; {Trace} ;;; {Trace}