diff options
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 46e2639..a155379 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -266,6 +266,7 @@ value_cast_structs (struct type *type, struct value *v2) { v = value_full_object (v2, real_type, full, top, using_enc); v = value_at_lazy (real_type, value_address (v)); + real_type = value_type (v); /* We might be trying to cast to the outermost enclosing type, in which case search_struct_field won't work. */ @@ -801,6 +802,7 @@ value_dynamic_cast (struct type *type, struct value *arg) return value_at_lazy (type, addr); tem = value_at (type, addr); + type = value_type (tem); /* The first dynamic check specified in 5.2.7. */ if (is_public_ancestor (arg_type, TYPE_TARGET_TYPE (resolved_type))) @@ -1320,6 +1322,7 @@ address_of_variable (struct symbol *var, const struct block *b) Lazy evaluation pays off here. */ val = value_of_variable (var, b); + type = value_type (val); if ((VALUE_LVAL (val) == lval_memory && value_lazy (val)) || TYPE_CODE (type) == TYPE_CODE_FUNC) @@ -1568,6 +1571,7 @@ value_ind (struct value *arg1) (value_as_address (arg1) - value_pointed_to_offset (arg1))); + enc_type = value_type (arg2); return readjust_indirect_value_type (arg2, enc_type, base_type, arg1); } |