From: Zoran Zaric Date: Fri, 26 Feb 2021 13:59:28 +0000 (+0000) Subject: Make value_copy also copy the stack data member X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=efa86d3c26457c4c619fddef8232738d5091978b;p=binutils-gdb.git 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. --- diff --git a/gdb/value.c b/gdb/value.c index 91db66fa3be..2cbaadc3641 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),