]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/*.exp
authorTom de Vries <tdevries@suse.de>
Thu, 4 Sep 2025 14:15:26 +0000 (16:15 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 4 Sep 2025 14:15:26 +0000 (16:15 +0200)
Fix clean_restart <absolute filename> in gdb.arch/*.exp.

The fixed test-cases are supported on archs sh, ia64, mips, pa and sparc.

I haven't tested these.

gdb/testsuite/gdb.arch/alpha-step.exp
gdb/testsuite/gdb.arch/gdb1291.exp
gdb/testsuite/gdb.arch/gdb1431.exp
gdb/testsuite/gdb.arch/gdb1558.exp
gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
gdb/testsuite/gdb.arch/mips-fpregset-core.exp
gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
gdb/testsuite/gdb.arch/pa-nullify.exp
gdb/testsuite/gdb.arch/sparc-sysstep.exp

index e41bd97e39d43599b08cc7825ed097724a5b0026..bdbfeecd341c2fc06d9438afdcc635814a358882 100644 (file)
@@ -25,7 +25,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] !
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 proc test_stepi {function } {
     # Restart the program from scratch. If GDB got confused during one
index ad3b8f9e26cb96ccc551f5d777d35262240515e5..9f460c8054bb8c1447a69e2820362c715092ae04 100644 (file)
@@ -33,7 +33,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] !
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 #
 # Run to `main' where we begin our tests.
index 34bc8d68de984ae2a1477277e284cd97af47e5a1..bc65d261327a7f4a00a489ac443c7af08da13a47 100644 (file)
@@ -35,7 +35,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] !
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 #
 # Run to `main' where we begin our tests.
index f6904684b325177e55e829ed0d3a58223d9255f2..3de57230a478f6b462921e9559a3fd6382b7eed0 100644 (file)
@@ -32,7 +32,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"add
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 gdb_test "b -q main" "Breakpoint 1.*" "set breakpoint at main"
 gdb_test "b -q sub1" "Breakpoint 2.*" "set breakpoint at sub1"
index 8e8ed9bb3f67e4c6ee77754517dd87926bff0056..d6fd14cfbddbcf0a9442f08a258f55e74d481d94 100644 (file)
@@ -23,7 +23,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 # We need to start the inferior to place the breakpoints in the memory at all.
 if ![runto_main] {
index aa55ededac33d97a188ec560447d7775da6b6ebd..d67cef2f5905fdb3a5cf035715983ccdb09ad967 100644 (file)
@@ -79,7 +79,8 @@ set core_supported [expr {$corefile != ""}]
 
 # Generate a core file with "gcore".
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 runto break_here
 
@@ -116,7 +117,8 @@ proc mips_fpregset_core_test { supported corefile } {
     upvar host_triplet host_triplet
     upvar binfile binfile
 
-    clean_restart ${binfile}
+    clean_restart
+    gdb_load $binfile
 
     set test "load core file"
     if { $supported } {
index 3fb6f9ccf6d19b17af092ca5e45306a2f0f03b87..f43127d3c8d5ad5bfd55cf65ec1400f139ad671d 100644 (file)
@@ -86,7 +86,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
 
 pass "compilation"
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 # Native needs run.
 runto_main
 
index 87afe7a9a9973334b0c54074d88d93f5e60fc836..ad246ca69eaec4025c185451ed50eb4b8d83ca4b 100644 (file)
@@ -40,7 +40,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] !
     return -1
 }
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 # In the first test, we do a "step" on a function whose last instruction 
 # contains a branch-with-nullify.  The instruction in the delay slot belongs
index 40de862c8c68a4a6768e6f121d142e7940b0901b..4dfc51437142061199b56f3fc43412fef38f30fb 100644 (file)
@@ -28,7 +28,7 @@ set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 set opts {}
 
-if {[prepare_for_testing "failed to prepare" ${binfile} $srcfile {additional_flags=-g}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {additional_flags=-g}]} {
     return -1
 }