[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/05: gdb: Adjust 'find-vp' for Guile 3.0.
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 03/05: gdb: Adjust 'find-vp' for Guile 3.0. |
Date: |
Tue, 17 Mar 2020 19:18:19 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guile.
commit a0aa8f01ccc1fd1da6d109daf9e13b0c530dd278
Author: Ludovic Courtès <address@hidden>
AuthorDate: Tue Mar 17 22:32:18 2020 +0100
gdb: Adjust 'find-vp' for Guile 3.0.
* libguile/libguile-3.0-gdb.scm (find-vp): Adjust for Guile 3.0.
---
libguile/libguile-3.0-gdb.scm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libguile/libguile-3.0-gdb.scm b/libguile/libguile-3.0-gdb.scm
index d3c99f7..869b68f 100644
--- a/libguile/libguile-3.0-gdb.scm
+++ b/libguile/libguile-3.0-gdb.scm
@@ -207,11 +207,12 @@ if the information is not available."
(define (find-vp)
"Find the scm_vm pointer for the current thread."
- (let loop ((frame (newest-frame)))
- (and frame
- (if (vm-engine-frame? frame)
- (frame-read-var frame "vp")
- (loop (frame-older frame))))))
+ (match (lookup-symbol "scm_i_current_thread")
+ ((#f _)
+ #f)
+ ((symbol _)
+ (let ((thread (symbol-value symbol)))
+ (value-field thread "vm")))))
(define (newest-vm-frame)
"Return the newest VM frame or #f."