+2021-04-30 Tom Tromey <tromey@adacore.com>
+
+ * ada-lang.c (ada_index_type): Use ada_check_typedef.
+
2021-04-29 Simon Marchi <simon.marchi@efficios.com>
* auto-load.h: Split namespace declaration.
int i;
for (i = 1; i < n; i += 1)
- type = TYPE_TARGET_TYPE (type);
- result_type = TYPE_TARGET_TYPE (type->index_type ());
+ {
+ type = ada_check_typedef (type);
+ type = TYPE_TARGET_TYPE (type);
+ }
+ result_type = TYPE_TARGET_TYPE (ada_check_typedef (type)->index_type ());
/* FIXME: The stabs type r(0,0);bound;bound in an array type
has a target type of TYPE_CODE_UNDEF. We compensate here, but
perhaps stabsread.c would make more sense. */
+2021-04-30 Tom Tromey <tromey@adacore.com>
+
+ * gdb.ada/enum_idx_packed/pck.ads (My_Enum, My_Array_Type)
+ (Confused_Array): New types.
+ * gdb.ada/enum_idx_packed/foo.adb (Confused_Array): New variable.
+ * gdb.ada/enum_idx_packed.exp: Add new tests.
+
2021-04-30 Tom de Vries <tdevries@suse.de>
* gdb.mi/mi-sym-info.exp: Add with_timeout_factor, and increase
gdb_test "print multi_access.all" \
" = \\(\\(8, 13, 21, 34, 55\\), \\(1, 1, 2, 3, 5\\)\\)"
+
+ gdb_test "print confused_array(red, green)" " = 2"
+ gdb_test "print confused_array(green, red)" " = 6"
}
:= new Multi_Dimension'(True => (1, 1, 2, 3, 5),
False => (8, 13, 21, 34, 55));
+ Confused_Array : Confused_Array_Type := (Red => (0, 1, 2),
+ Green => (5, 6, 7),
+ others => (others => 72));
+
begin
Do_Nothing (Full'Address); -- STOP
Do_Nothing (Primary'Address);
pragma Pack (Multi_Dimension);
type Multi_Dimension_Access is access all Multi_Dimension;
+ type My_Enum is (Blue, Red, Green);
+
+ type My_Array_Type is array (My_Enum) of Integer;
+ type Confused_Array_Type is array (Color) of My_Array_Type;
+
procedure Do_Nothing (A : System.Address);
end Pck;