mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-30 06:50:31 +02:00
only trace instructions inside the thunk
* module/system/vm/trace.scm (vm-trace): Only trace instructions when we're in the dynamic extent of the thunk.
This commit is contained in:
parent
8ad2fadc49
commit
839eb61cde
1 changed files with 7 additions and 6 deletions
|
@ -85,12 +85,13 @@
|
|||
(set! *call-depth* 0))))
|
||||
|
||||
(define (trace-next frame)
|
||||
(let* ((ip (frame-instruction-pointer frame))
|
||||
(objcode (program-objcode (frame-procedure frame)))
|
||||
(opcode (bytevector-u8-ref (objcode->bytecode objcode)
|
||||
(+ ip *objcode-header-len*)))
|
||||
(inst (opcode->instruction opcode)))
|
||||
(format #t "0x~8X: ~a: ~a\n" ip opcode inst)))
|
||||
(if *call-depth*
|
||||
(let* ((ip (frame-instruction-pointer frame))
|
||||
(objcode (program-objcode (frame-procedure frame)))
|
||||
(opcode (bytevector-u8-ref (objcode->bytecode objcode)
|
||||
(+ ip *objcode-header-len*)))
|
||||
(inst (opcode->instruction opcode)))
|
||||
(format #t "0x~8X: ~a: ~a\n" ip opcode inst))))
|
||||
|
||||
(define (vm-trace-on!)
|
||||
(if calls?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue