]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.arch/powerpc*.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/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.

27 files changed:
gdb/testsuite/gdb.arch/altivec-abi.exp
gdb/testsuite/gdb.arch/e500-prologue.exp
gdb/testsuite/gdb.arch/e500-regs.exp
gdb/testsuite/gdb.arch/powerpc-aix-prologue.exp
gdb/testsuite/gdb.arch/powerpc-altivec.exp
gdb/testsuite/gdb.arch/powerpc-altivec2.exp
gdb/testsuite/gdb.arch/powerpc-altivec3.exp
gdb/testsuite/gdb.arch/powerpc-d128-regs.exp
gdb/testsuite/gdb.arch/powerpc-fpscr-gcore.exp
gdb/testsuite/gdb.arch/powerpc-htm-regs.exp
gdb/testsuite/gdb.arch/powerpc-power10.exp
gdb/testsuite/gdb.arch/powerpc-power7.exp
gdb/testsuite/gdb.arch/powerpc-power8.exp
gdb/testsuite/gdb.arch/powerpc-power9.exp
gdb/testsuite/gdb.arch/powerpc-ppr-dscr.exp
gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp
gdb/testsuite/gdb.arch/powerpc-prologue.exp
gdb/testsuite/gdb.arch/powerpc-tar.exp
gdb/testsuite/gdb.arch/powerpc-vector-regs.exp
gdb/testsuite/gdb.arch/powerpc-vsx-gcore.exp
gdb/testsuite/gdb.arch/powerpc-vsx.exp
gdb/testsuite/gdb.arch/powerpc-vsx2.exp
gdb/testsuite/gdb.arch/powerpc-vsx3.exp
gdb/testsuite/gdb.arch/ppc-dfp.exp
gdb/testsuite/gdb.arch/ppc-fp.exp
gdb/testsuite/gdb.arch/ppc-longdouble.exp
gdb/testsuite/gdb.arch/vsx-regs.exp

index 12f523b1979c45fe9ab30a32e35149d7ecedbf47..fb5367d6b1419c74951f448d82f26f433419d83c 100644 (file)
@@ -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]} {
index e8f3ebd29d2724aa0d5274a6a5f80fcab063d713..b1eb8654cf83745c642dd8b10ca9c275ca6f6081 100644 (file)
@@ -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
index 543ce63eca485654f373767274ddb3e49d217e52..6d69cccc9c71b2183a4f95942a9d036809aa4bd6 100644 (file)
@@ -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
 }
index 13e3fd3d907aab9f6059f874e907246aa993cfdf..f95bddf792b1389ee3972f59eac0fa77ffa308f0 100644 (file)
@@ -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
index 987da076724e94cce162e41b5050e463e6d5ffc6..bc8ff7a4f19f7f984c170c535418c56e1dfc2352 100644 (file)
@@ -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 ""
index 3bf7c57053df4b6316feda6659ed4867a59e2483..6fddd34edab78eba53d1bcf793138456766b9e67 100644 (file)
@@ -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 ""
index ff1d79a377c109d3782fd0b607aeaab4d4b20cb8..7b1d0c3d3a96e80d0dff58eadc22fded1afa36e5 100644 (file)
@@ -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 ""
index 42fc51ef92a5388ded7ad916302d47b478f9f323..cb5a37105b9b3b4c86a5f32f5c713b23f8a75f50 100644 (file)
@@ -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
index a7614fab64d69144fe719358ad7ea0e03c9ddede..13163d22058c933ae7ef588635197540dbd89d13 100644 (file)
@@ -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
index 6fcb69f8b39c794aef07c36fb4eeaf36b3dc0078..5e2923fbd00a5ba377c6a4704250587f8dd82fb8 100644 (file)
@@ -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
 
index 1bb7174d70d24d3099ea4bda6df470cbb21ef5a4..124baaf401113b3e3b8f8ad7b9fedaaeaacd3476 100644 (file)
@@ -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 ""
index f33405d13d451c0f630ed5ddf0877c3bea7826f8..8885a916daafb793f6ac48a67bfc0e62abf8bd4a 100644 (file)
@@ -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 ""
index ab69b0f6768b07cc19ac95c05e13e4ae0010ac62..f740ae82d01e0fd21a647193f16fd8859dbcc610 100644 (file)
@@ -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 ""
index b1bfa9dbbe5a0249f0d7a7d6abf0d4f041c4ddc2..8dcf536b5465ccf645424cfbc93f7f918d3d6476 100644 (file)
@@ -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 ""
index ef6bb9d137c0618e21447028ef1cce1ade7d3d6a..1b4c6082703c50c0a128625ed96a091b405f9ae8 100644 (file)
@@ -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
index 3c79039b889d9270222bfa4f1df2fabcad428d46..156a70ef3822af90e363bfad75b63619a22c90a5 100644 (file)
@@ -26,7 +26,7 @@ if {[gdb_compile \
 }
 
 
-clean_restart ${binfile}
+clean_restart $testfile
 
 if ![runto bar] {
   untested "could not run to bar"
index 4e697c1213cd842764f4976a751b42018036e54b..44877a15d9ebd0161cd4668c1e7990736571ab5a 100644 (file)
@@ -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.
index b44d55447991ab42195ded84433a7c6ecd398986..a060ec8d8a0ab7152d83a30d969a258fe50a8622 100644 (file)
@@ -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
index 9e9162ed177e2c097eacddee9de21eced409293c..453764669bd61635a296bbb0c83f3600daa16df8 100644 (file)
@@ -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"]
 
index be1f93a16814a91242276f9e33c079c3ed19c629..db568c63a56204313f57c489a92b827251b2f754 100644 (file)
@@ -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
index a6832e6c0879fe92eb9f73749cb59b9f48f8c25e..73a0fdcfa9857e130712dec69d63f5d985e3c0d0 100644 (file)
@@ -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 ""
index d5cb18e4ca3ccfdd0833fa985ff76c14c981c8cc..dfee7a396b8ca9fb338883b75a989d16a4a39d54 100644 (file)
@@ -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 ""
index bd54eaf018d28017563fe00ce6845a00930359bb..fd725f98fd549042b1069b8ee27d1e4ff5f9fa6d 100644 (file)
@@ -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 ""
index d7a8312d3032017a15623ecfd790c3beb4e81603..20145ae6d679dec457eaa64377aa568c800600d7 100644 (file)
@@ -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."]
 
index 4733296433dc63355781fd58d07848174f02a225..c8342bbb0f08ae90ba873bb63eb2fa0e13ec2c1f 100644 (file)
@@ -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."]
index f3603f11bb680f066eacc5119a81ffd03ffee651..739e36f2a2e449141743c4a7c552074390dbf9c8 100644 (file)
@@ -28,7 +28,7 @@ proc do_test { name {opts {}} } {
         return
     }
 
-    clean_restart ${binfile}.${name}
+    clean_restart ${::testfile}.${name}
 
     if {![runto_main]} {
         return
index 645207fcf87791923fe603096b79d836784b1ff0..df74ef35e55d8a175ba37f7332be45935f75cec6 100644 (file)
@@ -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 } {