public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Don't use ensure_gdb_index with require
@ 2023-01-13 20:33 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-01-13 20:33 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=15bdcf4ca1514b89c242eccd3a74599bdd00e3e0
commit 15bdcf4ca1514b89c242eccd3a74599bdd00e3e0
Author: Tom Tromey <tom@tromey.com>
Date: Wed Dec 14 17:04:35 2022 -0700
Don't use ensure_gdb_index with require
This series changes 'require' to take a list of simple predicates.
This patch backs out the one use of 'require' that doesn't conform to
this -- calling ensure_gdb_index.
Diff:
---
gdb/testsuite/gdb.base/with-mf.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp | 5 ++++-
gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 ++++-
gdb/testsuite/gdb.rust/dwindex.exp | 5 ++++-
6 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.base/with-mf.exp b/gdb/testsuite/gdb.base/with-mf.exp
index c16027b6f18..f26d48e1026 100644
--- a/gdb/testsuite/gdb.base/with-mf.exp
+++ b/gdb/testsuite/gdb.base/with-mf.exp
@@ -24,7 +24,10 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart $binfile
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index e65cc88e427..d8ed180e31b 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -29,7 +29,10 @@ with_test_prefix non-symlink {
return -1
}
- require {ensure_gdb_index $binfile} != -1
+ if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+ }
}
# Regenerate exec without index.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index 12dc2c3d2d7..248bb28aabf 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -27,7 +27,10 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
index fc85795b996..2c9f037a80e 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
@@ -24,7 +24,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-require {ensure_gdb_index $binfile} == 1
+if { [ensure_gdb_index $binfile] != 1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart ${binfile}
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 92573034b9b..09c26ebaaf5 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -74,7 +74,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-require {ensure_gdb_index $binfile} != -1
+if { [ensure_gdb_index $binfile] == -1 } {
+ untested "error adding gdb index"
+ return -1
+}
clean_restart ${binfile}
diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index 306a7e7b246..4f05cb9eca8 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -26,7 +26,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
return -1
}
-require {ensure_gdb_index $binfile -dwarf-5} != -1
+if {[ensure_gdb_index $binfile -dwarf-5] == -1} {
+ untested "error adding gdb index"
+ return -1
+}
gdb_exit
gdb_start
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-13 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 20:33 [binutils-gdb] Don't use ensure_gdb_index with require Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).