summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-17 22:33:07 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-17 22:57:41 +0100
commit5d715dd467c19d2be5ab4c2b52e51e9a247a0867 (patch)
tree06ca4a397628c5f441def466ee0824580d534a6d
parenta0aa8f01ccc1fd1da6d109daf9e13b0c530dd278 (diff)
downloadguile-5d715dd467c19d2be5ab4c2b52e51e9a247a0867.tar.gz
gdb: Avoid accessing values that are optimized out.
* libguile/libguile-3.0-gdb.scm (vm-frame-function-name)[ip-in-symbol?]: Do not access SYM's value when it's optimized out.
-rw-r--r--libguile/libguile-3.0-gdb.scm1
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/libguile-3.0-gdb.scm b/libguile/libguile-3.0-gdb.scm
index 869b68f19..4010f79be 100644
--- a/libguile/libguile-3.0-gdb.scm
+++ b/libguile/libguile-3.0-gdb.scm
@@ -297,6 +297,7 @@ if the information is not available."
(define (ip-in-symbol? name)
(let ((sym (lookup-symbol-or-false name)))
(and sym
+ (not (value-optimized-out? (symbol-value sym)))
(let* ((val (symbol-value sym))
(size (type-sizeof (value-type val)))
(char* (type-pointer (arch-char-type (current-arch))))