Remove array typedef assumption for Ada
authorTom Tromey <tromey@adacore.com>
Fri, 17 Jun 2022 13:41:37 +0000 (07:41 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 18 Jul 2022 15:57:04 +0000 (09:57 -0600)
commit6a40c6e4374a660eab5cdc2f8a777ccbd7a81951
tree58413fbd5fbe095288fc93c6474a0b84dbe6f757
parent083aca0c8333fc24c6a65a03fca765bc13ee37c0
Remove array typedef assumption for Ada

Currently the Ada code assumes that it can distinguish between a
multi-dimensional array and an array of arrays by looking for an
intervening typedef -- that is, for an array of arrays, there will be
a typedef wrapping the innermost array type.

A recent compiler change removes this typedef, which causes a gdb
failure in the internal AdaCore test suite.

This patch handles this case by checking whether the array type in
question has a name.
gdb/ada-lang.c
gdb/ada-typeprint.c
gdb/testsuite/gdb.ada/multiarray.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/multiarray/p.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/multiarray/pack.ads [new file with mode: 0644]