SHA256
9
0
forked from pool/gdb
Files
gdb/check-gnatmake-version-in-gnat_version_compare.patch
Tom de Vries fcf6764793 Fix bsc#1251213
- Patches added:
  * avoid-crash-with-length.patch
  * correct-bounds-check-when-working-around-gas-dwarf-5.patch
  * fix-crash-in-f-typeprint.c.patch
- Patches added (swo#33560, bsc#1251213):
  * bfd-elf-handle-prstatus-of-156-bytes-in-elf32_arm_na.patch
  * gdb-corefiles-fix-segfault-in-add_thread_silent.patch
- Patches added (swo#32542, swo#33354):
  * change-return-value-of-_bfd_mmap_temporary.patch
- Patches added (swo#33068, swo#33069):
  * gdb-fix-handling-of-aborted-inferior-call.patch
- Patches added (swo#33620):
  * gdb-rust-fix-handling-of-unsigned-discriminant.patch
- Patches added (swo#33444):
  * have-gdb.threadexitedevent-inherit-from-gdb.threadev.patch
- Patches added (swo#33617):
  * mark-pascal-as-case-insensitive.patch
- Patches added (testsuite):
  * check-gnatmake-version-in-gnat_version_compare.patch
  * gdb-testsuite-fix-build-id-check-in-gdb.python-py-mi.patch
  * gdb-testsuite-fix-gdb.mi-mi-sym-info.exp.patch
  * gdb-testsuite-fix-gdb.rust-methods.exp-on-i686-linux.patch
  * gdb-testsuite-fix-main-in-gdb.trace-mi-trace-frame-c.patch
  * gdb-testsuite-fix-possible-tcl-errors-in-gdb.threads.patch
  * gdb-testsuite-fix-sizeof-test-in-gdb.rust-simple.exp.patch
  * gdb-testsuite-fix-xfail-in-gdb.ada-array_of_variant..patch
  * gdb-testsuite-fix-xfail-in-gdb.ada-variant_record_fi.patch
  * gdb-testsuite-force-dwarf-in-gdb.pascal.patch
  * gdb-testsuite-rust-fix-for-empty-array.patch
  * gdb-testsuite-use-expect_build_id_in_core_file-a-bit.patch
  * gdb-testsuite-use-std-c99-in-gdb.base-callfuncs.exp.patch
  * gdb-testsuite-use-std-c99-in-gdb.base-nodebug.exp.patch
  * powerpc-mark-rtti-typeid-tests-as-expected-fail-befo.patch
- Maintenance script import-patches.sh:
  * Use git instead of osc.
- Maintenance script qa.sh:
  * Add PR32893 kfail.
2025-11-26 08:34:17 +01:00

45 lines
1.4 KiB
Diff

From f0aa64a18995ba181aa975804934e9b4b02bf076 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@adacore.com>
Date: Mon, 31 Mar 2025 11:53:53 -0600
Subject: [PATCH 14/25] Check gnatmake version in gnat_version_compare
Tom de Vries pointed out that my earlier change to
gnat_version_compare made it actually test gcc's version -- not
gnat's.
This patch changes gnat_version_compare to examine gnatmake's version,
while preserving the nicer API.
Approved-By: Tom de Vries <tdevries@suse.de>
---
gdb/testsuite/lib/ada.exp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 4d04d597474..3d18e6ad82c 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -223,12 +223,16 @@ proc gnatmake_version_at_least { major } {
# compiler does not appear to be GCC, this will always return false.
proc gnat_version_compare {op l2} {
- set gccvers [gcc_major_version]
- if {$gccvers == -1} {
+ set gnatmake [find_gnatmake]
+ set gnatmake [lindex [split $gnatmake] 0]
+ if {[catch {exec $gnatmake --version} output]} {
+ return 0
+ }
+ if {![regexp {GNATMAKE ([0-9]+(\.[0-9]+)*)} $output match version]} {
return 0
}
- return [version_compare [split $gccvers .] $op $l2]
+ return [version_compare [split $version .] $op $l2]
}
# Return 1 if the GNAT runtime appears to have debug info.
--
2.51.0