[RFC,3/5] Use "critical ensure_gdb_index" in gdb.rust
Commit Message
This converts gdb.rust to use "critical ensure_gdb_index" rather than
"if".
---
gdb/testsuite/gdb.base/with-mf.exp | 5 +----
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 10 ++--------
gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 5 +----
gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 +----
gdb/testsuite/gdb.rust/dwindex.exp | 5 +----
5 files changed, 6 insertions(+), 24 deletions(-)
@@ -24,10 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
clean_restart $binfile
@@ -30,10 +30,7 @@ with_test_prefix non-symlink {
return -1
}
- if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
- }
+ critical ensure_gdb_index $binfile
}
# Regenerate exec without index.
@@ -48,10 +45,7 @@ if { ![file exists $symlink] } {
file link -symbolic $symlink $binfile
}
-if { [ensure_gdb_index $symlink] == -1 } {
- fail "Unable to call gdb-add-index with a symlink to a symfile"
- return -1
-}
+critical ensure_gdb_index $symlink
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
@@ -25,10 +25,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
@@ -72,10 +72,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
clean_restart ${binfile}
@@ -25,10 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
return -1
}
-if {[ensure_gdb_index $binfile -dwarf-5] == -1} {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile -dwarf-5
gdb_exit
gdb_start