]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.base, part 3
authorTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 13:36:23 +0000 (15:36 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 13:36:23 +0000 (15:36 +0200)
Fix fallout in gdb.base from erroring out on clean_restart
<absolute filename>.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/break-interp.exp
gdb/testsuite/gdb.base/execl-update-breakpoints.exp
gdb/testsuite/gdb.base/jit-reader.exp
gdb/testsuite/gdb.base/large-frame.exp
gdb/testsuite/gdb.base/msym-bp-shl.exp
gdb/testsuite/gdb.base/reset-catchpoint-cond.exp

index 04d8c553c68439acf53aff6ec38826c1bd6f7e50..038c3ea442726baab21a8e532b8fef26da0e6471 100644 (file)
@@ -78,7 +78,8 @@ gdb_test_multiple $test $test {
 }
 
 set interp_system [section_get [standard_output_file $binfile_test] .interp]
-clean_restart $interp_system
+clean_restart
+gdb_load $interp_system
 set dl_main_found 0
 gdb_test_multiple "info addr dl_main" "" {
     -re -wrap "Symbol \"dl_main\" is a function at address $hex\\." {
index 27bd042e49ecd77d6e75daa2658cf7daaa8c6870..cd49df1826a2fb441122dd4476ce70b0d28f46ee 100644 (file)
@@ -41,7 +41,8 @@ if { [gdb_compile $objfile $exec1 executable {debug text_segment=0x1000000}] !=
 # First check whether the address of "main" in exec1 is readable in
 # exec2.  If it is, then skip the test as unsupported.
 
-clean_restart ${exec1}
+clean_restart
+gdb_load $exec1
 if {![runto_main]} {
     return -1
 }
@@ -55,7 +56,8 @@ gdb_test_multiple "p/x &main" $test {
     }
 }
 
-clean_restart ${exec2}
+clean_restart
+gdb_load $exec2
 if {![runto_main]} {
     return -1
 }
@@ -84,7 +86,8 @@ proc test { always_inserted } {
     global exec1
     global gdb_prompt
 
-    clean_restart ${exec1}
+    clean_restart
+    gdb_load $exec1
 
     gdb_test_no_output "set breakpoint always-inserted $always_inserted"
 
index 4462ab4aa654b13ff3bd8d84b9a259bd3482b371..cd844ca75d25f636bb7c2ebf1fe98df0ba37baf0 100644 (file)
@@ -102,7 +102,8 @@ proc jit_reader_test {} {
 
     set any "\[^\r\n\]*"
 
-    clean_restart $jit_host_bin
+    clean_restart
+    gdb_load $jit_host_bin
     gdb_load_shlib $jit_reader_bin
 
     if {$test_verbose > 0} {
index 0418b5ba28e51e7fbb08ded6f518a016107c5dc7..f0d7af6c8b219a3d5bd8ff3fe34848b5bb94531e 100644 (file)
@@ -28,12 +28,12 @@ if { [is_remote host] } {
 # the test.
 
 proc run_test { opt_level } {
-    global srcfile srcfile2 binfile hex
+    global srcfile srcfile2 hex
 
     standard_testfile large-frame-1.c large-frame-2.c
 
     if {[prepare_for_testing_full "failed to prepare" \
-            [list ${binfile}-${opt_level} debug \
+            [list $::testfile-$opt_level debug \
                  $srcfile [list debug] \
                  $srcfile2 [list nodebug optimize=-$opt_level]]]} {
        return
index b154ce662520efc8dd396ed0b422c39e350d5b65..41dc818b4296f304e99196b26a0434f2af51c9ca 100644 (file)
@@ -55,7 +55,8 @@ proc test {debug} {
        return
     }
 
-    clean_restart $bin
+    clean_restart
+    gdb_load $bin
     gdb_load_shlib $lib
 
     # Should find two locations: the static foo in the
index 062dc6309173aabc1b4b7184330879c0004e21a5..852576acaedc2d70202e8ff17271469d3d2a1ad0 100644 (file)
@@ -75,7 +75,8 @@ proc run_test { mode } {
        return
     }
 
-    clean_restart $exec_name
+    clean_restart
+    gdb_load $exec_name
     gdb_load_shlib $::libfile
 
     if {![runto_main]} {