From 6fab5bef695fa30739bf940cad5fdeeb10b9818f Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Tue, 5 May 1992 05:31:21 +0000 Subject: * values.c (set_internalvar): Force evaluation of lazy values. Bug reported by RMS. --- gdb/values.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/values.c') 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); } -- cgit v1.1