From: Joel Brobecker Date: Tue, 24 Mar 2009 01:58:22 +0000 (+0000) Subject: * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bc23cb38a1dcffee544f89ecfc25b5774bdd45d;p=binutils-gdb.git * 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/ChangeLog b/gdb/ChangeLog index 02f37a1f6e4..73205452798 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2009-03-23 Joel Brobecker + + * 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. + 2009-03-23 Joel Brobecker * ada-lang.c (ada_get_field_index): Add handling of the case diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b4e1eb952c0..b9a0a3d3b11 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 {