mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 12:10:28 +02:00
* debug.scm (frame-number->index): Optionally take stack as
argument.
This commit is contained in:
parent
0c76ebbd1f
commit
6de43e5fda
1 changed files with 7 additions and 4 deletions
|
@ -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}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue