aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 8890c8e..f8a059e 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -255,6 +255,14 @@ record_latest_value (val)
}
value_history_chain->values[i] = val;
+
+ /* We don't want this value to have anything to do with the inferior anymore.
+ In particular, "set $1 = 50" should not affect the variable from which
+ the value was taken, and fast watchpoints should be able to assume that
+ a value on the value history never changes. */
+ if (VALUE_LAZY (val))
+ value_fetch_lazy (val);
+ VALUE_LVAL (val) = not_lval;
release_value (val);
/* Now we regard value_history_count as origin-one