OSDN Git Service

* ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
authorJoel Brobecker <brobecker@gnat.com>
Tue, 24 Mar 2009 02:00:51 +0000 (02:00 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 24 Mar 2009 02:00:51 +0000 (02:00 +0000)
        to make sure we try to get the modulus of the actual type, not the
        associated typedef.

gdb/ChangeLog
gdb/ada-lang.c

index 7320545..f6f8c29 100644 (file)
@@ -1,5 +1,11 @@
 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
 
+       * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
+       to make sure we try to get the modulus of the actual type, not the
+       associated typedef.
+
+2009-03-23  Joel Brobecker  <brobecker@adacore.com>
+
        * 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.
index b9a0a3d..38902af 100644 (file)
@@ -9010,7 +9010,7 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
 
     case OP_ATR_MODULUS:
       {
-        struct type *type_arg = exp->elts[pc + 2].type;
+        struct type *type_arg = check_typedef (exp->elts[pc + 2].type);
         evaluate_subexp (NULL_TYPE, exp, pos, EVAL_SKIP);
 
         if (noside == EVAL_SKIP)