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:
parent
95f5b0f5ec
commit
8ccbf00d9a
1 changed files with 8 additions and 0 deletions
|
@ -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}
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue