1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

* debug.scm (frame-number->index): New function. Convert frame

number (as displayed in the backtrace) to frame index (to be used
in stack-ref).
This commit is contained in:
Mikael Djurfeldt 1997-08-24 03:32:43 +00:00
parent 95f5b0f5ec
commit 8ccbf00d9a

View file

@ -111,6 +111,14 @@
(define-all)
;;; {Misc}
;;;
(define-public (frame-number->index n)
(if (memq 'backwards (debug-options))
n
(- (stack-length the-last-stack) n 1)))
;;; {Trace}
;;;