Non bit-packed packed arrays as variable-length fields
authorJerome Guitton <guitton@adacore.com>
Thu, 26 Mar 2015 15:19:27 +0000 (16:19 +0100)
committerJoel Brobecker <brobecker@adacore.com>
Fri, 15 May 2015 21:00:57 +0000 (14:00 -0700)
commit931e5bc3e19d1e279fc28c5cf5571f812c79b8d3
tree48194de8ebbed604f308183f4207630d7f2ebe4b
parentfd8008d83ce379a8d3f3bb9c3b1a723e16c401d4
Non bit-packed packed arrays as variable-length fields

In the case of non bit-packed arrays, GNAT does not generate its
traditional XP encoding; it is not needed. However, it still generates
the so-called "implementation type" with a P suffix. This
implementation type shall be skipped when looking for other
descriptive types such as XA encodings for variable-length
fields.

Note also that there may be an intermediate typedef between the
implementation type and its XA description. It shall be skipped
as well.

gdb/ChangeLog:

        Jerome Guitton  <guitton@adacore.com>
* ada-lang.c (find_parallel_type_by_descriptive_type):
Go through typedefs during lookup.
(to_fixed_array_type): Add support for non-bit packed arrays
as variable-length fields.

gdb/testsuite/ChangeLog:

        * gdb.ada/byte_packed_arr: New testcase.
gdb/ChangeLog
gdb/ada-lang.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/byte_packed_arr.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/byte_packed_arr/array_list_g.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/byte_packed_arr/reprod.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/byte_packed_arr/reprod.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/byte_packed_arr/reprod_main.adb [new file with mode: 0644]