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
commit9651adf4a4f5929b65fb42651e68f893a5ae72e7 (patch)
treea4283d6837a0bda4398202703ea05db62a61dae8
parent40cd67be49603ddf3cc426bf133c7db0f8a55a66 (diff)
downloadbinutils-9651adf4a4f5929b65fb42651e68f893a5ae72e7.zip
binutils-9651adf4a4f5929b65fb42651e68f893a5ae72e7.tar.gz
binutils-9651adf4a4f5929b65fb42651e68f893a5ae72e7.tar.bz2
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/powerpc*.exp
Fix clean_restart <absolute filename> in gdb.arch/powerpc*.exp. Likewise in gdb.arch/ppc*.exp, gdb.arch/altivec*.exp, gdb.arch/e500*.exp and gdb.arch/vsx*.exp. Tested on ppc64le-linux. The following test-cases only run on 32-bit ppc: - gdb.arch/e500-abi.exp - gdb.arch/e500-prologue.exp - gdb.arch/e500-regs.exp - gdb.arch/powerpc-aix-prologue.exp - gdb.arch/powerpc-prologue.exp - gdb.arch/powerpc-prologue-frame.exp - gdb.arch/powerpc-trap.exp so these haven't been tested.
-rw-r--r--gdb/testsuite/gdb.arch/altivec-abi.exp3
-rw-r--r--gdb/testsuite/gdb.arch/e500-prologue.exp3
-rw-r--r--gdb/testsuite/gdb.arch/e500-regs.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-altivec.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-altivec2.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-altivec3.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-d128-regs.exp2
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp2
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-htm-regs.exp5
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-power10.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-power7.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-power8.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-power9.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp4
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp2
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-prologue.exp2
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-tar.exp4
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-vector-regs.exp4
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp2
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-vsx.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-vsx2.exp3
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-vsx3.exp3
-rw-r--r--gdb/testsuite/gdb.arch/ppc-dfp.exp2
-rw-r--r--gdb/testsuite/gdb.arch/ppc-fp.exp2
-rw-r--r--gdb/testsuite/gdb.arch/ppc-longdouble.exp2
-rw-r--r--gdb/testsuite/gdb.arch/vsx-regs.exp3
27 files changed, 47 insertions, 31 deletions
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 12f523b..fb5367d 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -47,7 +47,8 @@ proc altivec_abi_tests { extra_flags force_abi } {
}
}
- clean_restart $binfile
+ clean_restart
+ gdb_load $::binfile
# Run to `main' where we begin our tests.
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.arch/e500-prologue.exp b/gdb/testsuite/gdb.arch/e500-prologue.exp
index e8f3ebd..b1eb865 100644
--- a/gdb/testsuite/gdb.arch/e500-prologue.exp
+++ b/gdb/testsuite/gdb.arch/e500-prologue.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] !
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Insert a breakpoint in FUNCTION and verifies that the breakpoint was
# inserted at the expected location. EXPECTED_LOCATION should be an
diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp
index 543ce63..6d69ccc 100644
--- a/gdb/testsuite/gdb.arch/e500-regs.exp
+++ b/gdb/testsuite/gdb.arch/e500-regs.exp
@@ -136,7 +136,8 @@ gdb_expect_list "info vector" ".*$gdb_prompt $" {
# We must restart everything, because we have set important registers to
# some unusual values.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
index 13e3fd3..f95bddf 100644
--- a/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
@@ -28,7 +28,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] !
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Insert a breakpoint in FUNCTION and verifies that the breakpoint was
# inserted at the expected location. EXPECTED_LOCATION should be an
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec.exp b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
index 987da07..bc8ff7a 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec2.exp b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
index 3bf7c57..6fddd34 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec2.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-altivec3.exp b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
index ff1d79a..7b1d0c3 100644
--- a/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-altivec3.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
index 42fc51e..cb5a371 100644
--- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
@@ -29,7 +29,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {qui
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp b/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
index a7614fa..13163d2 100644
--- a/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
@@ -34,7 +34,7 @@ if {[build_executable "compile" $binfile $gen_src] == -1} {
return -1
}
-clean_restart $binfile
+clean_restart $testfile
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
index 6fcb69f..5e2923f 100644
--- a/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
@@ -82,7 +82,8 @@ with_test_prefix "check htm support" {
return
}
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Displaced-stepping a tbegin. causes problems,
# so we make the breakpoint temporary.
@@ -131,7 +132,7 @@ if {[build_executable "compile" $binfile $srcfile {debug}] == -1} {
return
}
-clean_restart $binfile
+clean_restart $testfile
gdb_breakpoint [gdb_get_line_number "first marker"] temporary
diff --git a/gdb/testsuite/gdb.arch/powerpc-power10.exp b/gdb/testsuite/gdb.arch/powerpc-power10.exp
index 1bb7174..124baaf 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power10.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power10.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-power7.exp b/gdb/testsuite/gdb.arch/powerpc-power7.exp
index f33405d..8885a91 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power7.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power7.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-power8.exp b/gdb/testsuite/gdb.arch/powerpc-power8.exp
index ab69b0f..f740ae8 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power8.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power8.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-power9.exp b/gdb/testsuite/gdb.arch/powerpc-power9.exp
index b1bfa9d..8dcf536 100644
--- a/gdb/testsuite/gdb.arch/powerpc-power9.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-power9.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp b/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
index ef6bb9d..1b4c608 100644
--- a/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
@@ -66,7 +66,7 @@ proc ppr_dscr_available {} {
}
with_test_prefix "check PPR/DSCR access" {
- clean_restart $binfile
+ clean_restart $::testfile
if ![runto_main] {
return
@@ -86,7 +86,7 @@ with_test_prefix "check PPR/DSCR access" {
}
# Now do the actual test
-clean_restart $binfile
+clean_restart $::testfile
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
index 3c79039..156a70e 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
@@ -26,7 +26,7 @@ if {[gdb_compile \
}
-clean_restart ${binfile}
+clean_restart $testfile
if ![runto bar] {
untested "could not run to bar"
diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue.exp b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
index 4e697c1..44877a1 100644
--- a/gdb/testsuite/gdb.arch/powerpc-prologue.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-prologue.exp
@@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] !
}
-clean_restart $binfile
+clean_restart $testfile
#
# Run to `main' where we begin our tests.
diff --git a/gdb/testsuite/gdb.arch/powerpc-tar.exp b/gdb/testsuite/gdb.arch/powerpc-tar.exp
index b44d554..a060ec8 100644
--- a/gdb/testsuite/gdb.arch/powerpc-tar.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-tar.exp
@@ -68,7 +68,7 @@ proc tar_available {} {
# Do one pass to check if TAR is usable, system
# software can prevent it from being used.
with_test_prefix "check TAR access" {
- clean_restart $binfile
+ clean_restart $::testfile
if ![runto_main] {
return
@@ -84,7 +84,7 @@ with_test_prefix "check TAR access" {
}
# Now do the actual test
-clean_restart $binfile
+clean_restart $::testfile
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp b/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
index 9e9162e..4537646 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
@@ -30,7 +30,7 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}]
}
# Check if our test binary can actually run on this processor.
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_run_cmd
@@ -44,7 +44,7 @@ gdb_test_multiple "" "wait for exit" {
}
# Run the actual test.
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_breakpoint [gdb_get_line_number "marker"]
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp b/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
index be1f93a..db568c6 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
@@ -34,7 +34,7 @@ if {[build_executable "compile" $binfile $gen_src] == -1} {
return -1
}
-clean_restart $binfile
+clean_restart $testfile
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx.exp b/gdb/testsuite/gdb.arch/powerpc-vsx.exp
index a6832e6..73a0fdc 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx2.exp b/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
index d5cb18e..dfee7a3 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx2.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/powerpc-vsx3.exp b/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
index bd54eaf..fd725f9 100644
--- a/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-vsx3.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}]
return -1
}
-clean_restart ${objfile}
+clean_restart
+gdb_load $objfile
# Disassemble the function.
set func ""
diff --git a/gdb/testsuite/gdb.arch/ppc-dfp.exp b/gdb/testsuite/gdb.arch/ppc-dfp.exp
index d7a8312..20145ae 100644
--- a/gdb/testsuite/gdb.arch/ppc-dfp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-dfp.exp
@@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
gdb_breakpoint [gdb_get_line_number "Set DFP rounding mode."]
diff --git a/gdb/testsuite/gdb.arch/ppc-fp.exp b/gdb/testsuite/gdb.arch/ppc-fp.exp
index 4733296..c8342bb 100644
--- a/gdb/testsuite/gdb.arch/ppc-fp.exp
+++ b/gdb/testsuite/gdb.arch/ppc-fp.exp
@@ -31,7 +31,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
gdb_breakpoint [gdb_get_line_number "Invalid operation."]
gdb_breakpoint [gdb_get_line_number "Division by zero."]
diff --git a/gdb/testsuite/gdb.arch/ppc-longdouble.exp b/gdb/testsuite/gdb.arch/ppc-longdouble.exp
index f3603f1..739e36f 100644
--- a/gdb/testsuite/gdb.arch/ppc-longdouble.exp
+++ b/gdb/testsuite/gdb.arch/ppc-longdouble.exp
@@ -28,7 +28,7 @@ proc do_test { name {opts {}} } {
return
}
- clean_restart ${binfile}.${name}
+ clean_restart ${::testfile}.${name}
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp
index 645207f..df74ef3 100644
--- a/gdb/testsuite/gdb.arch/vsx-regs.exp
+++ b/gdb/testsuite/gdb.arch/vsx-regs.exp
@@ -184,7 +184,8 @@ if {!$core_supported} {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set core_loaded [gdb_core_cmd "$corefile" "re-load generated corefile"]
if { $core_loaded == -1 } {