From: Tom de Vries Date: Thu, 4 Sep 2025 14:15:26 +0000 (+0200) Subject: [gdb/testsuite] Fix clean_restart in gdb.arch/powerpc*.exp X-Git-Tag: gdb-17-branchpoint~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9651adf4a4f5929b65fb42651e68f893a5ae72e7;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix clean_restart in gdb.arch/powerpc*.exp Fix clean_restart 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. --- diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index 12f523b1979..fb5367d6b14 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 e8f3ebd29d2..b1eb8654cf8 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 543ce63eca4..6d69cccc9c7 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 13e3fd3d907..f95bddf792b 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 987da076724..bc8ff7a4f19 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 3bf7c57053d..6fddd34edab 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 ff1d79a377c..7b1d0c3d3a9 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 42fc51ef92a..cb5a37105b9 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 a7614fab64d..13163d22058 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 6fcb69f8b39..5e2923fbd00 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 1bb7174d70d..124baaf4011 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 f33405d13d4..8885a916daa 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 ab69b0f6768..f740ae82d01 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 b1bfa9dbbe5..8dcf536b546 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 ef6bb9d137c..1b4c6082703 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 3c79039b889..156a70ef382 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 4e697c1213c..44877a15d9e 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 b44d5544799..a060ec8d8a0 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 9e9162ed177..453764669bd 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 be1f93a1681..db568c63a56 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 a6832e6c087..73a0fdcfa98 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 d5cb18e4ca3..dfee7a396b8 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 bd54eaf018d..fd725f98fd5 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 d7a8312d303..20145ae6d67 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 4733296433d..c8342bbb0f0 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 f3603f11bb6..739e36f2a2e 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 645207fcf87..df74ef35e55 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 } {