aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2002-11-05 08:25:13 +0000
committerPierre Muller <muller@sourceware.org>2002-11-05 08:25:13 +0000
commitcc303028fc9843fa3789d2ecdda0e5b11aec2e32 (patch)
treecb380613e733c7b94814235184b592286ed73fec /gdb/values.c
parent911b232a921a38e89c0048b00c1526fd429257ab (diff)
downloadgdb-cc303028fc9843fa3789d2ecdda0e5b11aec2e32.zip
gdb-cc303028fc9843fa3789d2ecdda0e5b11aec2e32.tar.gz
gdb-cc303028fc9843fa3789d2ecdda0e5b11aec2e32.tar.bz2
2002-10-07 Pierre Muller <muller@ics.u-strasbg.fr>
* values.c (value_change_enclosing_type): Set enclosing_type field correctly also for the case where more memory needs to be allocated.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c
index c943f28..950dee6 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -862,7 +862,9 @@ value_change_enclosing_type (struct value *val, struct type *new_encl_type)
struct value *prev;
new_val = (struct value *) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type));
-
+
+ VALUE_ENCLOSING_TYPE (new_val) = new_encl_type;
+
/* We have to make sure this ends up in the same place in the value
chain as the original copy, so it's clean-up behavior is the same.
If the value has been released, this is a waste of time, but there