aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2006-12-13 22:36:48 +0000
committerJim Blandy <jimb@codesourcery.com>2006-12-13 22:36:48 +0000
commit6f7c8fc2c5dbc4d526833c8be993a6d035c7e63b (patch)
treea73b80cce62d7e1627e0bd9cac206b66bca2a484
parentc2051761329bf524ff808170c1664019d5d33b19 (diff)
downloadgdb-6f7c8fc2c5dbc4d526833c8be993a6d035c7e63b.zip
gdb-6f7c8fc2c5dbc4d526833c8be993a6d035c7e63b.tar.gz
gdb-6f7c8fc2c5dbc4d526833c8be993a6d035c7e63b.tar.bz2
* value.c (value_copy): Copy the full 'location' contents, instead
of assuming that copying ADDRESS will bring over everything in the union.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/value.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5db44c3..049a484 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-13 Jim Blandy <jimb@codesourcery.com>
+
+ * value.c (value_copy): Copy the full 'location' contents, instead
+ of assuming that copying ADDRESS will bring over everything in the
+ union.
+
2006-12-13 Markus Deuling <deuling@de.ibm.com>
* spu-tdep.c (spu_init_vector_type): New function.
diff --git a/gdb/value.c b/gdb/value.c
index 77b92f6..c01444a 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -551,7 +551,7 @@ value_copy (struct value *arg)
struct value *val = allocate_value (encl_type);
val->type = arg->type;
VALUE_LVAL (val) = VALUE_LVAL (arg);
- VALUE_ADDRESS (val) = VALUE_ADDRESS (arg);
+ val->location = arg->location;
val->offset = arg->offset;
val->bitpos = arg->bitpos;
val->bitsize = arg->bitsize;