"info tasks" broken by typedefs in ATCB type definitions.
authorJoel Brobecker <brobecker@gnat.com>
Fri, 15 Jan 2010 12:11:21 +0000 (12:11 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 15 Jan 2010 12:11:21 +0000 (12:11 +0000)
        * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
        ada_check_typedef before retrieving the length of the type for
        regular fields.

gdb/ChangeLog
gdb/ada-lang.c

index 4d0431a3e3345434265e86eca490912e6468333e..4224558e7733d8dff4a5a0055969b98ece8ffedb 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-15  Joel Brobecker  <brobecker@adacore.com>
+
+       "info tasks" broken by typedefs in ATCB type definitions.
+       * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
+       ada_check_typedef before retrieving the length of the type for
+       regular fields.
+
 2010-01-15  Joel Brobecker  <brobecker@adacore.com>
 
        Do not use name-based lookup for unconstrained packed arrays.
index 8f9071172fc22091646a7e1f9fd700ee3fb87292..2f16644e79688df98c5a40d61d4ac192574851e2 100644 (file)
@@ -6929,14 +6929,16 @@ ada_template_to_fixed_record_type_1 (struct type *type,
         }
       else
         {
-          TYPE_FIELD_TYPE (rtype, f) = TYPE_FIELD_TYPE (type, f);
+          struct type *field_type = TYPE_FIELD_TYPE (type, f);
+
+          TYPE_FIELD_TYPE (rtype, f) = field_type;
           TYPE_FIELD_NAME (rtype, f) = TYPE_FIELD_NAME (type, f);
           if (TYPE_FIELD_BITSIZE (type, f) > 0)
             bit_incr = fld_bit_len =
               TYPE_FIELD_BITSIZE (rtype, f) = TYPE_FIELD_BITSIZE (type, f);
           else
             bit_incr = fld_bit_len =
-              TYPE_LENGTH (TYPE_FIELD_TYPE (type, f)) * TARGET_CHAR_BIT;
+              TYPE_LENGTH (ada_check_typedef (field_type)) * TARGET_CHAR_BIT;
         }
       if (off + fld_bit_len > bit_len)
         bit_len = off + fld_bit_len;