]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.cp
authorTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 16:56:37 +0000 (18:56 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 3 Sep 2025 16:56:37 +0000 (18:56 +0200)
Fix clean_restart <absolute filename> in the test-cases in gdb.cp.

Tested on x86_64-linux.

gdb/testsuite/gdb.cp/call-c.exp
gdb/testsuite/gdb.cp/gdb2384.exp
gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl
gdb/testsuite/gdb.cp/pr10728.exp
gdb/testsuite/gdb.cp/print-global-stub.exp
gdb/testsuite/gdb.cp/psmang.exp
gdb/testsuite/gdb.cp/ref-params.exp
gdb/testsuite/gdb.cp/rvalue-ref-params.exp

index f99d1712e120af90f703650d3ae751195003b7de..6d240c865457e3499da46dd3c92ba0b14880e5ca 100644 (file)
@@ -27,7 +27,7 @@ if {[gdb_compile "$srcdir/$subdir/${srcfile2}" "${objfilec}" object {debug}] !=
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 runto_main
 
index 204bdeb3aa1214395feccbfbf630abf2e6ac91c6..a53ec3a8cccf9a7138c6b7cbe580f478cb115cdb 100644 (file)
@@ -35,7 +35,7 @@ if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 gdb_load_shlib ${sofile}
 
 
index 0a7bc76002d97963b73ff26f8d967c2c90350b83..46e48d0983ef534ce90262b8467ffbda99a6b319 100644 (file)
@@ -71,7 +71,7 @@ proc build_and_run_test { lang symbols } {
 
     # Startup and run to main.
 
-    clean_restart $binfile
+    clean_restart $::testfile
 
     if ![runto_main] then {
        return
index 0525ac1b61d41a51540d115e6fd7047ec5b66d49..8201e243996d3b3135a03a095b04e403c95cefa9 100644 (file)
@@ -42,7 +42,7 @@ if  { [gdb_compile "${tfx}.o ${tfy}.o" ${binfile} executable {debug c++}] != ""
      return -1
 }
 
-clean_restart $binfile
+clean_restart $::testfile
 
 if {![runto_main]} {
     return
index 139e8b158a85de01b477cef506994a3e20a34ac9..d847c00687600516aced5d271cd0fb242741e5a1 100644 (file)
 require allow_cplus_tests
 
 standard_testfile .cc
-set objfile [standard_output_file ${testfile}.o]
+set testfile $testfile.o
+set binfile [standard_output_file $testfile]
 
-if { [gdb_compile $srcdir/$subdir/$srcfile $objfile object \
+if { [gdb_compile $srcdir/$subdir/$srcfile $binfile object \
          {c++ debug}] != "" } {
     untested "failed to compile"
     return -1
 }
 
-clean_restart $objfile
+clean_restart $testfile
 
 gdb_test "print s" " = <incomplete type>"
index acc7b3bf634387b9190ecced3563b9a62cd750b9..67bc9cd935d83c9671b32a94b871be72aca94927 100644 (file)
@@ -190,6 +190,6 @@ gdb_test "break s::method1" "Breakpoint .* at .*: file .*psmang1.cc.*"
 # We have to exit and restart GDB here, to make sure that all the
 # compilation units are psymtabs again.
 
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 gdb_test "break s::method2" "Breakpoint .* at .*: file .*psmang2.cc.*"
index 97a56ab252c81119148f6aaa45dd5ce3a4ac40bb..4f2cbb5dace4b751d9cdcaa8c0b1aa30d0010fdb 100644 (file)
@@ -32,7 +32,7 @@ proc gdb_start_again { text } {
     global binfile
     global srcfile
 
-    clean_restart $binfile
+    clean_restart $::testfile
 
     runto ${srcfile}:[gdb_get_line_number $text]
 }
index 8a5e66f68cb23236ea1398fe6c572b27183a546a..267dbc71758789fa97c60e084b2b5bb183116633 100644 (file)
@@ -30,7 +30,7 @@ proc gdb_start_again {text prefix} {
     global srcfile
 
     with_test_prefix $prefix {
-       clean_restart $binfile
+       clean_restart $::testfile
 
        runto ${srcfile}:[gdb_get_line_number $text]
     }