aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorZoran Zaric <Zoran.Zaric@amd.com>2021-02-26 13:59:28 +0000
committerZoran Zaric <zoran.zaric@amd.com>2021-08-05 16:40:42 +0100
commitefa86d3c26457c4c619fddef8232738d5091978b (patch)
tree128f729a0ee36ef45ba78f4ea43353cf531be590 /gdb/value.c
parentf4091d26441c7a3bead8bdfd1a37f072a32f40a0 (diff)
downloadgdb-efa86d3c26457c4c619fddef8232738d5091978b.zip
gdb-efa86d3c26457c4c619fddef8232738d5091978b.tar.gz
gdb-efa86d3c26457c4c619fddef8232738d5091978b.tar.bz2
Make value_copy also copy the stack data member
Fixing a bug where the value_copy function did not copy the stack data and initialized members of the struct value. This is needed for the next patch where the DWARF expression evaluator is changed to return a single struct value object. * value.c (value_copy): Change to also copy the stack data and initialized members.
Diffstat (limited to 'gdb/value.c')
-rw-r--r--gdb/value.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/value.c b/gdb/value.c
index 91db66f..2cbaadc 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -1692,6 +1692,8 @@ value_copy (struct value *arg)
val->embedded_offset = value_embedded_offset (arg);
val->pointed_to_offset = arg->pointed_to_offset;
val->modifiable = arg->modifiable;
+ val->stack = arg->stack;
+ val->initialized = arg->initialized;
if (!value_lazy (val))
{
memcpy (value_contents_all_raw (val), value_contents_all_raw (arg),