diff options
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/ada-valprint.c | 3 | ||||
-rw-r--r-- | gdb/valprint.c | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b060291..368b24c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2017-03-03 Yao Qi <yao.qi@linaro.org> + + PR gdb/21165 + * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if + value is lazy. + * valprint.c (common_val_print): Likewise. + 2017-02-28 Peter Bergner <bergner@vnet.ibm.com> * NEWS: Mention new set/show disassembler-options commands. diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c index 804cf40..d2489a2 100644 --- a/gdb/ada-valprint.c +++ b/gdb/ada-valprint.c @@ -1058,6 +1058,9 @@ ada_val_print_ref (struct type *type, const gdb_byte *valaddr, (Eg: an array whose bounds are not set yet). */ ada_ensure_varsize_limit (value_type (deref_val)); + if (value_lazy (deref_val)) + value_fetch_lazy (deref_val); + val_print (value_type (deref_val), value_embedded_offset (deref_val), value_address (deref_val), stream, recurse + 1, diff --git a/gdb/valprint.c b/gdb/valprint.c index c3e17ff..529f9a5 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1201,6 +1201,9 @@ common_val_print (struct value *val, struct ui_file *stream, int recurse, get a fixed representation of our value. */ val = ada_to_fixed_value (val); + if (value_lazy (val)) + value_fetch_lazy (val); + val_print (value_type (val), value_embedded_offset (val), value_address (val), stream, recurse, |