aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-09-04 16:15:26 +0200
committerTom de Vries <tdevries@suse.de>2025-09-04 16:15:26 +0200
commit9463d3e7563186ea9800ff2ba8ae909c31e5e854 (patch)
tree4f04202370cfb63d7f4a7e89b41b7b35461a5835
parent9651adf4a4f5929b65fb42651e68f893a5ae72e7 (diff)
downloadbinutils-9463d3e7563186ea9800ff2ba8ae909c31e5e854.zip
binutils-9463d3e7563186ea9800ff2ba8ae909c31e5e854.tar.gz
binutils-9463d3e7563186ea9800ff2ba8ae909c31e5e854.tar.bz2
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/*.exp
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.
-rw-r--r--gdb/testsuite/gdb.arch/alpha-step.exp3
-rw-r--r--gdb/testsuite/gdb.arch/gdb1291.exp3
-rw-r--r--gdb/testsuite/gdb.arch/gdb1431.exp3
-rw-r--r--gdb/testsuite/gdb.arch/gdb1558.exp3
-rw-r--r--gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp3
-rw-r--r--gdb/testsuite/gdb.arch/mips-fpregset-core.exp6
-rw-r--r--gdb/testsuite/gdb.arch/mips-octeon-bbit.exp3
-rw-r--r--gdb/testsuite/gdb.arch/pa-nullify.exp3
-rw-r--r--gdb/testsuite/gdb.arch/sparc-sysstep.exp2
9 files changed, 19 insertions, 10 deletions
diff --git a/gdb/testsuite/gdb.arch/alpha-step.exp b/gdb/testsuite/gdb.arch/alpha-step.exp
index e41bd97..bdbfeec 100644
--- a/gdb/testsuite/gdb.arch/alpha-step.exp
+++ b/gdb/testsuite/gdb.arch/alpha-step.exp
@@ -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
diff --git a/gdb/testsuite/gdb.arch/gdb1291.exp b/gdb/testsuite/gdb.arch/gdb1291.exp
index ad3b8f9..9f460c8 100644
--- a/gdb/testsuite/gdb.arch/gdb1291.exp
+++ b/gdb/testsuite/gdb.arch/gdb1291.exp
@@ -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.
diff --git a/gdb/testsuite/gdb.arch/gdb1431.exp b/gdb/testsuite/gdb.arch/gdb1431.exp
index 34bc8d6..bc65d26 100644
--- a/gdb/testsuite/gdb.arch/gdb1431.exp
+++ b/gdb/testsuite/gdb.arch/gdb1431.exp
@@ -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.
diff --git a/gdb/testsuite/gdb.arch/gdb1558.exp b/gdb/testsuite/gdb.arch/gdb1558.exp
index f690468..3de5723 100644
--- a/gdb/testsuite/gdb.arch/gdb1558.exp
+++ b/gdb/testsuite/gdb.arch/gdb1558.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
index 8e8ed9b..d6fd14c 100644
--- a/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
+++ b/gdb/testsuite/gdb.arch/ia64-breakpoint-shadow.exp
@@ -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] {
diff --git a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
index aa55ede..d67cef2 100644
--- a/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
+++ b/gdb/testsuite/gdb.arch/mips-fpregset-core.exp
@@ -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 } {
diff --git a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
index 3fb6f9c..f43127d 100644
--- a/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
+++ b/gdb/testsuite/gdb.arch/mips-octeon-bbit.exp
@@ -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
diff --git a/gdb/testsuite/gdb.arch/pa-nullify.exp b/gdb/testsuite/gdb.arch/pa-nullify.exp
index 87afe7a..ad246ca 100644
--- a/gdb/testsuite/gdb.arch/pa-nullify.exp
+++ b/gdb/testsuite/gdb.arch/pa-nullify.exp
@@ -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
diff --git a/gdb/testsuite/gdb.arch/sparc-sysstep.exp b/gdb/testsuite/gdb.arch/sparc-sysstep.exp
index 40de862..4dfc514 100644
--- a/gdb/testsuite/gdb.arch/sparc-sysstep.exp
+++ b/gdb/testsuite/gdb.arch/sparc-sysstep.exp
@@ -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
}