diff options
author | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-11-05 08:25:13 +0000 |
---|---|---|
committer | Pierre Muller <muller@ics.u-strasbg.fr> | 2002-11-05 08:25:13 +0000 |
commit | 0b5d7badc714b862357b4e6cd5d80ce5cd5d31c9 (patch) | |
tree | 94d075c0d98a2e4b0f2ac06a709870165f762fd6 /gdb/values.c | |
parent | 0c45f5f6e89020287e26bf210994a48eb701014e (diff) | |
download | gdb-0b5d7badc714b862357b4e6cd5d80ce5cd5d31c9.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/values.c b/gdb/values.c index c943f28fa46..950dee68e99 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 |