commit c574f412380c58b6b215fafe04878f7047b18b6e Author: Joel Brobecker Date: Mon Mar 23 17:08:52 2009 -0700 Fix issues with 'first/'last/'length attributes. * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST] [OP_ATR_LENGTH]: When using the attribute on a type, make sure to get the real type, not the associated typedef. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b4e1eb9..b9a0a3d 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -8872,7 +8872,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, { evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP); arg1 = NULL; - type_arg = exp->elts[pc + 2].type; + type_arg = check_typedef (exp->elts[pc + 2].type); } else {