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:
parent
0c76ebbd1f
commit
6de43e5fda
1 changed files with 7 additions and 4 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue