From 5ec18f2b48ab74bbbaf436324ce3947df3bc048e Mon Sep 17 00:00:00 2001 From: Jerome Guitton Date: Wed, 12 Feb 2014 12:08:23 +0100 Subject: [Ada] Full view of tagged type with ptype When evaluating an expression, if it is of a tagged type, GDB reads the tag in memory and deduces the full view. At parsing time, however, this operation is done only in the case of OP_VAR_VALUE. ptype does not go through a full evaluation of expressions so it may return some odd results: (gdb) print c.menu_name $1 = 0x0 (gdb) ptype $ type = system.strings.string_access (gdb) ptype c.menu_name type = This change removes this peculiarity by extending the tag resolution to UNOP_IND and STRUCTOP_STRUCT. As in the case of OP_VAR_VALUE, this implies switching from EVAL_AVOID_SIDE_EFFECTS to EVAL_NORMAL when a tagged type is dereferenced. gdb/ * ada-lang.c (ada_evaluate_subexp): Resolve tagged types to full view in the case of UNOP_IND and STRUCTOP_STRUCT. gdb/testsuite/ * gdb.ada/tagged_access: New testcase. --- gdb/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60087c7..73ab666 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-03-10 Jerome Guitton + + * ada-lang.c (ada_evaluate_subexp): Resolve tagged types to + full view in the case of UNOP_IND and STRUCTOP_STRUCT. + 2014-03-10 Hui Zhu * target.h (target_insert_breakpoint): Remove "hardware" from its -- cgit v1.1