aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ada-lang.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f8ba05b..336d950 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -1949,6 +1949,8 @@ ada_is_unconstrained_packed_array_type (struct type *type)
/* The structure's first field is a pointer to an array, so this
fetches the array type. */
type = TYPE_TARGET_TYPE (type->field (0).type ());
+ if (type->code () == TYPE_CODE_TYPEDEF)
+ type = ada_typedef_target_type (type);
/* Now we can see if the array elements are packed. */
return TYPE_FIELD_BITSIZE (type, 0) > 0;
}