diff options
author | John Gilmore <gnu@cygnus> | 1992-05-05 05:31:21 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-05-05 05:31:21 +0000 |
commit | 6fab5bef695fa30739bf940cad5fdeeb10b9818f (patch) | |
tree | 5f2c99dc6c5ca5c85cf7b7cebb43f1fbc50dc0f5 /gdb/values.c | |
parent | e727f8ea91f763c544c8d4b98f6f8e774aa16934 (diff) | |
download | gdb-6fab5bef695fa30739bf940cad5fdeeb10b9818f.zip gdb-6fab5bef695fa30739bf940cad5fdeeb10b9818f.tar.gz gdb-6fab5bef695fa30739bf940cad5fdeeb10b9818f.tar.bz2 |
* values.c (set_internalvar): Force evaluation of lazy values.
Bug reported by RMS.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/values.c b/gdb/values.c index c7ab7b7..08c970b 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -453,6 +453,11 @@ set_internalvar (var, val) free ((PTR)var->value); var->value = value_copy (val); + /* Force the value to be fetched from the target now, to avoid problems + later when this internalvar is referenced and the target is gone or + has changed. */ + if (VALUE_LAZY (var->value)) + value_fetch_lazy (var->value); release_value (var->value); } |