Add tests for Ada changes
authorTom Tromey <tromey@adacore.com>
Fri, 24 Apr 2020 19:40:31 +0000 (13:40 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 24 Apr 2020 19:40:33 +0000 (13:40 -0600)
commitadfb981595c1ea12736b6d3c4686973040f171ff
treea008a9b892732f5ca28604778faf5e11fcafb1af
parentd656f129ebc7b96db96244d0206fc7fb9af85a65
Add tests for Ada changes

The previous patches largely came without test cases.  This was done
to make the patches easier to review; as most of the patches were
needed before existing tests could be updated.

This patch adds a new test and updates some existing tests to test all
the settings of -fgnat-encodings.  This ensures that tests are run
both with the old-style "magic symbol name" encoding, and the
new-style DWARF encoding.

Note that in one case, a test is modified to be more lax.  See the
comment in mi_var_array.exp.  I didn't want to fix this in this
series, as it's already complicated enough.  However, I think it could
be fixed; I will file a bug for it.

gdb/testsuite/ChangeLog
2020-04-24  Tom Tromey  <tromey@adacore.com>

* gdb.ada/mi_var_array.exp: Try all -fgnat-encodings settings.
Make array type matching more lax.
* gdb.ada/mi_var_union.exp: Try all -fgnat-encodings settings.
* gdb.ada/mi_variant.exp: New file.
* gdb.ada/mi_variant/pck.ads: New file.
* gdb.ada/mi_variant/pkg.adb: New file.
* gdb.ada/packed_tagged.exp: Try all -fgnat-encodings settings.
* gdb.ada/unchecked_union.exp: Try all -fgnat-encodings settings.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/mi_var_array.exp
gdb/testsuite/gdb.ada/mi_var_union.exp
gdb/testsuite/gdb.ada/mi_variant.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/mi_variant/pck.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/mi_variant/pkg.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/packed_tagged.exp
gdb/testsuite/gdb.ada/unchecked_union.exp