From 9f1f738adae6b28c4f7db7e3607b4c224f1f7612 Mon Sep 17 00:00:00 2001 From: Sanimir Agovic Date: Mon, 14 Oct 2013 08:36:13 +0100 Subject: vla: update type from newly created value Constructing a value based on a type and address might change the type of the newly constructed value. Thus re-fetch type via value_type to ensure we have the correct type at hand. gdb/ChangeLog * ada-lang.c (ada_value_primitive_packed_val): Re-fetch type from value. (ada_template_to_fixed_record_type_1): Likewise. (ada_to_fixed_type_1): Likewise. * cp-valprint.c (cp_print_value_fields_rtti): Likewise. (cp_print_value): Likewise. * d-valprint.c (dynamic_array_type): Likewise. * findvar.c (address_of_variable): Likewise. * jv-valprint.c (java_value_print): Likewise. * valops.c (value_ind): Likewise. * value.c (coerce_ref): Likewise. --- gdb/jv-valprint.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gdb/jv-valprint.c') diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c index 82bdd9b..a7bb494 100644 --- a/gdb/jv-valprint.c +++ b/gdb/jv-valprint.c @@ -65,6 +65,7 @@ java_value_print (struct value *val, struct ui_file *stream, type = lookup_pointer_type (type); val = value_at (type, address); + type = value_type (val); } } -- cgit v1.1