aboutsummaryrefslogtreecommitdiff
path: root/gdb/d-valprint.c
diff options
context:
space:
mode:
authorSanimir Agovic <sanimir.agovic@intel.com>2013-10-14 08:36:13 +0100
committerJoel Brobecker <brobecker@adacore.com>2014-04-14 09:15:33 -0700
commit9f1f738adae6b28c4f7db7e3607b4c224f1f7612 (patch)
treea1a19486f98f1d2566940b89b9a2bf0ab03574a5 /gdb/d-valprint.c
parent3c8452d46ac23d455c30438d0885a738e02b56e1 (diff)
downloadgdb-9f1f738adae6b28c4f7db7e3607b4c224f1f7612.zip
gdb-9f1f738adae6b28c4f7db7e3607b4c224f1f7612.tar.gz
gdb-9f1f738adae6b28c4f7db7e3607b4c224f1f7612.tar.bz2
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.
Diffstat (limited to 'gdb/d-valprint.c')
-rw-r--r--gdb/d-valprint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/d-valprint.c b/gdb/d-valprint.c
index 90095cd..755f180 100644
--- a/gdb/d-valprint.c
+++ b/gdb/d-valprint.c
@@ -59,6 +59,7 @@ dynamic_array_type (struct type *type, const gdb_byte *valaddr,
true_type = lookup_array_range_type (true_type, 0, length - 1);
ival = value_at (true_type, addr);
+ true_type = value_type (ival);
d_val_print (true_type,
value_contents_for_printing (ival),