]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce and use gnat_version_compare
authorTom Tromey <tromey@adacore.com>
Thu, 26 Sep 2024 14:48:03 +0000 (08:48 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 15 Oct 2024 19:36:29 +0000 (13:36 -0600)
commit1411185a57ed246558f0f97d7faf0dc050de3708
tree232eea52c9f810e5d5cc5dcd7a18bbfdb41cd2ab
parenta104f0a3e62031d2a5aabfe9e82f55158647f444
Introduce and use gnat_version_compare

While testing a modified GNAT, I found that this test in
fun_renaming.exp was returning 0 for GCC 13:

    if {[test_compiler_info {gcc-6*}]}

This patch introduces a new, more robust way to check the GNAT
compiler version, and changes the gda.ada tests to use it.  A small
update to version_compare was also needed.

Note that, in its current form, this new code won't really interact
well with non-GCC compilers (specifically gnat-llvm).  This doesn't
seem like a major issue at this point, though, because gnat-llvm
doesn't properly emit debuginfo yet, and when it does, more changes
will be needed in these tests anyway.

Reviewed-by: Keith Seitz <keiths@redhat.com>
15 files changed:
gdb/testsuite/gdb.ada/array_of_variant.exp
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/arrayptr.exp
gdb/testsuite/gdb.ada/big_packed_array.exp
gdb/testsuite/gdb.ada/enum_idx_packed.exp
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/fun_renaming.exp
gdb/testsuite/gdb.ada/mod_from_name.exp
gdb/testsuite/gdb.ada/null_array.exp
gdb/testsuite/gdb.ada/packed_array_assign.exp
gdb/testsuite/gdb.ada/packed_record.exp
gdb/testsuite/gdb.ada/pckd_arr_ren.exp
gdb/testsuite/gdb.ada/variant_record_packed_array.exp
gdb/testsuite/lib/ada.exp
gdb/testsuite/lib/gdb-utils.exp