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

Tested on x86_64-linux.

gdb/testsuite/gdb.guile/scm-pretty-print.exp
gdb/testsuite/gdb.guile/scm-symbol.exp
gdb/testsuite/gdb.guile/scm-type.exp
gdb/testsuite/gdb.guile/scm-value.exp

index 09717a971c6265f692d54dd3c99d0e0114ffe9ca..b95c0cb5878a620b8e409fdc59d0363ad54c469d 100644 (file)
@@ -33,7 +33,8 @@ proc run_lang_tests {exefile lang} {
        set nl "\[\r\n\]+"
 
        # Start with a fresh gdb.
-       clean_restart $exefile
+       clean_restart
+       gdb_load $exefile
 
        if ![gdb_guile_runto_main] {
            return
@@ -114,7 +115,7 @@ run_lang_tests "${binfile}-cxx" "c++"
 
 # Run various other tests.
 
-clean_restart $binfile
+clean_restart $::testfile
 
 if ![gdb_guile_runto_main] {
     return
index b6ebffd0582309590531000f7a46af577c50e11d..96bd56089badb0648462cac6df9aee9758587217 100644 (file)
@@ -141,7 +141,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" executable "
     return -1
 }
 
-clean_restart ${binfile}-cxx
+clean_restart ${::testfile}-cxx
 
 if ![gdb_guile_runto_main] {
     return
index 1167dd13fe43ee2b0486c23173129d23b480ba92..640dd5b2c04f3b77ceb4f50a64e354c41aeed1eb 100644 (file)
@@ -38,7 +38,8 @@ proc build_inferior {exefile lang} {
 proc restart_gdb {exefile} {
     global srcdir subdir
 
-    clean_restart $exefile
+    clean_restart
+    gdb_load $exefile
 
     if { ![allow_guile_tests] } {
        return 0
index 1567b1375ee209943f86e0199e6a05dc31c62521..d723aebc786f4d4537177e6ee7a240713ef3bb0e 100644 (file)
@@ -309,7 +309,8 @@ proc test_value_after_death {} {
 
 proc test_subscript_regression {exefile lang} {
     # Start with a fresh gdb.
-    clean_restart ${exefile}
+    clean_restart
+    gdb_load ${exefile}
 
     if ![gdb_guile_runto_main ] {
        return
@@ -427,7 +428,7 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
 }
 
 # Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart ${::testfile}
 
 gdb_install_guile_utils
 gdb_install_guile_module