aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-01-15 12:11:21 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-01-15 12:11:21 +0000
commit9f0dec2d111e754b5c72c1552e2574f5c9f0e11a (patch)
treed5da7e80f0d41144b1a77f7b5ac9dfc9644bdf1e /gdb/ada-lang.c
parent12ab9e09fa95b49831c733ac432e4f40d76136a6 (diff)
downloadgdb-9f0dec2d111e754b5c72c1552e2574f5c9f0e11a.zip
gdb-9f0dec2d111e754b5c72c1552e2574f5c9f0e11a.tar.gz
gdb-9f0dec2d111e754b5c72c1552e2574f5c9f0e11a.tar.bz2
"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.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 8f90711..2f16644 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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;