aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-09-05 15:36:23 +0200
committerTom de Vries <tdevries@suse.de>2025-09-05 15:36:23 +0200
commit2e61486fcefe8812714dcb0fb787581592675502 (patch)
tree5f48664a66d01f7c68275f925586f0b1bccf14f6
parent202beb3feebd44fbc1979d9fdb4d74c44e16a417 (diff)
downloadbinutils-2e61486fcefe8812714dcb0fb787581592675502.zip
binutils-2e61486fcefe8812714dcb0fb787581592675502.tar.gz
binutils-2e61486fcefe8812714dcb0fb787581592675502.tar.bz2
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.base, part 2
Manually fix the test-cases found by: ... $ find gdb/testsuite/gdb.base -name *.exp* \ | xargs grep -l 'clean_restart[^;]*binfile' $ find gdb/testsuite/gdb.base -name *.exp* \ | xargs grep -l 'prepare_for_testing.*bin' ... except for gdb.base/foll-vfork.exp and gdb.base/solib-overlap.exp. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp3
-rw-r--r--gdb/testsuite/gdb.base/bp-cond-failure.exp2
-rw-r--r--gdb/testsuite/gdb.base/break-fun-addr.exp3
-rw-r--r--gdb/testsuite/gdb.base/break-idempotent.exp2
-rw-r--r--gdb/testsuite/gdb.base/call-sc.exp2
-rw-r--r--gdb/testsuite/gdb.base/cli-suppress-notification.exp2
-rw-r--r--gdb/testsuite/gdb.base/condbreak-bad.exp2
-rw-r--r--gdb/testsuite/gdb.base/cvexpr.exp2
-rw-r--r--gdb/testsuite/gdb.base/detach-sysroot-target.exp2
-rw-r--r--gdb/testsuite/gdb.base/foll-exec.exp.tcl18
-rw-r--r--gdb/testsuite/gdb.base/gcore-relro-pie.exp3
-rw-r--r--gdb/testsuite/gdb.base/gcore-tls-pie.exp3
-rw-r--r--gdb/testsuite/gdb.base/gdb-index-err.exp6
-rw-r--r--gdb/testsuite/gdb.base/gnu-ifunc.exp6
-rw-r--r--gdb/testsuite/gdb.base/info-program.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-bfd-name.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-elf-fork.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-elf-so.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-elf.exp6
-rw-r--r--gdb/testsuite/gdb.base/jit-reader-simple.exp6
-rw-r--r--gdb/testsuite/gdb.base/macro-source-path.exp3
-rw-r--r--gdb/testsuite/gdb.base/max-depth.exp.tcl2
-rw-r--r--gdb/testsuite/gdb.base/readnever.exp2
-rw-r--r--gdb/testsuite/gdb.base/rtld-step.exp3
-rw-r--r--gdb/testsuite/gdb.base/skip.exp3
-rw-r--r--gdb/testsuite/gdb.base/structs.exp2
-rw-r--r--gdb/testsuite/gdb.base/structs2.exp2
-rw-r--r--gdb/testsuite/gdb.base/style.exp6
-rw-r--r--gdb/testsuite/gdb.base/sym-file.exp3
-rw-r--r--gdb/testsuite/gdb.base/testenv.exp2
-rw-r--r--gdb/testsuite/gdb.base/tls-nothreads.exp3
31 files changed, 69 insertions, 42 deletions
diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
index fce6d67..5f5432c 100644
--- a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
+++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
@@ -52,7 +52,8 @@ proc prepare_test {has_cfi} {
return false
}
- clean_restart "$binfile-${extension}"
+ clean_restart
+ gdb_load $binfile-$extension
if ![runto callback] then {
fail "has_cfi=$has_cfi: Can't run to callback"
diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/gdb.base/bp-cond-failure.exp
index 5388522..f33092b 100644
--- a/gdb/testsuite/gdb.base/bp-cond-failure.exp
+++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp
@@ -26,7 +26,7 @@
standard_testfile
-if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug c++}] == -1 } {
return
}
diff --git a/gdb/testsuite/gdb.base/break-fun-addr.exp b/gdb/testsuite/gdb.base/break-fun-addr.exp
index 9f5325a..ba6e32e 100644
--- a/gdb/testsuite/gdb.base/break-fun-addr.exp
+++ b/gdb/testsuite/gdb.base/break-fun-addr.exp
@@ -44,7 +44,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {d
# on the first instruction of function "main" ("*main"), then
# run to that breakpoint.
-clean_restart ${binfile1}
+clean_restart
+gdb_load $binfile1
with_test_prefix "${testfile1}" {
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index ed23b64..3b32c89 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -161,7 +161,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
set binfile [standard_output_file $testfile-$pie]
- if {[prepare_for_testing "failed to prepare" $binfile $srcfile $opts]} {
+ if {[prepare_for_testing "failed to prepare" $testfile-$pie $srcfile $opts]} {
continue
}
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index 4d0fccc..f67670d 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -46,7 +46,7 @@ proc start_scalars_test { type } {
set testfile "call-sc-${type}"
set binfile [standard_output_file ${testfile}]
- if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
+ if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
return -1
}
diff --git a/gdb/testsuite/gdb.base/cli-suppress-notification.exp b/gdb/testsuite/gdb.base/cli-suppress-notification.exp
index 19f9c55..6880d98 100644
--- a/gdb/testsuite/gdb.base/cli-suppress-notification.exp
+++ b/gdb/testsuite/gdb.base/cli-suppress-notification.exp
@@ -17,7 +17,7 @@
standard_testfile
-if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return
}
diff --git a/gdb/testsuite/gdb.base/condbreak-bad.exp b/gdb/testsuite/gdb.base/condbreak-bad.exp
index 7aff409..19c16dc 100644
--- a/gdb/testsuite/gdb.base/condbreak-bad.exp
+++ b/gdb/testsuite/gdb.base/condbreak-bad.exp
@@ -17,7 +17,7 @@
standard_testfile
-if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return
}
diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp
index 3e527db..e2f8c35 100644
--- a/gdb/testsuite/gdb.base/cvexpr.exp
+++ b/gdb/testsuite/gdb.base/cvexpr.exp
@@ -517,7 +517,7 @@ foreach testspec $specs {
# These tests don't rely on the debug format.
with_test_prefix nodebug {
- if { [prepare_for_testing "failed to prepare" $binfile $srcfile {nodebug}] } {
+ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
return 0
}
diff --git a/gdb/testsuite/gdb.base/detach-sysroot-target.exp b/gdb/testsuite/gdb.base/detach-sysroot-target.exp
index 4248c86..c7466c0 100644
--- a/gdb/testsuite/gdb.base/detach-sysroot-target.exp
+++ b/gdb/testsuite/gdb.base/detach-sysroot-target.exp
@@ -22,7 +22,7 @@
standard_testfile
-if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return
}
diff --git a/gdb/testsuite/gdb.base/foll-exec.exp.tcl b/gdb/testsuite/gdb.base/foll-exec.exp.tcl
index 8f96a55..64bcea8 100644
--- a/gdb/testsuite/gdb.base/foll-exec.exp.tcl
+++ b/gdb/testsuite/gdb.base/foll-exec.exp.tcl
@@ -68,7 +68,8 @@ proc do_exec_tests { execer_lang execee_lang } {
}
# Now we can start running the tests.
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
if {![runto_main]} {
@@ -93,7 +94,8 @@ proc do_exec_tests { execer_lang execee_lang } {
return
}
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
#
@@ -182,7 +184,8 @@ proc do_exec_tests { execer_lang execee_lang } {
# Explicitly kill this program, or a subsequent rerun actually runs
# the exec'd program, not the original program...
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
#
@@ -250,7 +253,8 @@ proc do_exec_tests { execer_lang execee_lang } {
# Explicitly kill this program, or a subsequent rerun actually runs
# the exec'd program, not the original program...
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
#
@@ -317,7 +321,8 @@ proc do_exec_tests { execer_lang execee_lang } {
# Explicitly kill this program, or a subsequent rerun actually runs
# the exec'd program, not the original program...
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
#
@@ -378,7 +383,8 @@ proc do_exec_tests { execer_lang execee_lang } {
# Explicitly kill this program, or a subsequent rerun actually runs
# the exec'd program, not the original program...
- clean_restart $execer_binfile
+ clean_restart
+ gdb_load $execer_binfile
# Start the program running, and stop at main.
#
diff --git a/gdb/testsuite/gdb.base/gcore-relro-pie.exp b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
index 1f27a0b..641caf1 100644
--- a/gdb/testsuite/gdb.base/gcore-relro-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
@@ -38,7 +38,8 @@ if [run_on_host "strip" "$strip_program" "-g -o ${stripped_binfile} $binfile"] {
set perm [file attributes ${binfile} -permissions]
file attributes ${stripped_binfile} -permissions $perm
-clean_restart ${stripped_binfile}
+clean_restart
+gdb_load $stripped_binfile
# The binary is stripped of debug info, but not minsyms.
if ![runto break_here] {
diff --git a/gdb/testsuite/gdb.base/gcore-tls-pie.exp b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
index 1ad9b55..a8f7366 100644
--- a/gdb/testsuite/gdb.base/gcore-tls-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
@@ -42,7 +42,8 @@ if [run_on_host "strip" "$strip_program" "-g -o ${stripped_binfile} $binfile"] {
set perm [file attributes ${binfile} -permissions]
file attributes ${stripped_binfile} -permissions $perm
-clean_restart ${stripped_binfile}
+clean_restart
+gdb_load $stripped_binfile
# The binary is stripped of debug info, but not minsyms.
if ![runto break_here] {
diff --git a/gdb/testsuite/gdb.base/gdb-index-err.exp b/gdb/testsuite/gdb.base/gdb-index-err.exp
index 973248a..b353836 100644
--- a/gdb/testsuite/gdb.base/gdb-index-err.exp
+++ b/gdb/testsuite/gdb.base/gdb-index-err.exp
@@ -90,13 +90,15 @@ foreach_with_prefix flag { "" "-dwarf-5" } {
}
# Add the index section to the executable.
- clean_restart ${binfile}.${extension}
+ clean_restart
+ gdb_load $binfile.$extension
gdb_assert {[ensure_gdb_index ${binfile}.${extension} ${flag}] == 1} \
"add index to executable"
# Reload the executable (which now has an index), and try to
# generate and index from it. This will fail.
- clean_restart ${binfile}.${extension}
+ clean_restart
+ gdb_load $binfile.$extension
gdb_test "save gdb-index ${flag} $already_indexed_dir" \
"Error while writing index for `[string_to_regexp $binfile.$extension]': Cannot use an index to create the index" \
"try to generate an index from a binary with an index"
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 20a0997..f134a0f 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -96,7 +96,8 @@ proc_with_prefix set-break {resolver_attr resolver_debug final_debug} {
set suffix [make_binsuffix $resolver_attr $resolver_debug $final_debug]
set lib_so [standard_output_file ${libfile}-$suffix.so]
- clean_restart $binfile-$suffix
+ clean_restart
+ gdb_load $binfile-$suffix
gdb_load_shlib ${lib_so}
if {![runto_main]} {
@@ -223,7 +224,8 @@ proc misc_tests {resolver_attr resolver_debug final_debug} {
# Start with a fresh gdb.
- clean_restart $binfile-$suffix
+ clean_restart
+ gdb_load $binfile-$suffix
gdb_load_shlib ${lib_so}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp
index 5a47e1e..da24880 100644
--- a/gdb/testsuite/gdb.base/info-program.exp
+++ b/gdb/testsuite/gdb.base/info-program.exp
@@ -35,7 +35,8 @@ standard_testfile
proc do_test { threads non-stop } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart $::binfile-$threads
+ clean_restart
+ gdb_load $::binfile-$threads
}
gdb_test "info program" \
diff --git a/gdb/testsuite/gdb.base/jit-bfd-name.exp b/gdb/testsuite/gdb.base/jit-bfd-name.exp
index 219929b..756a38b 100644
--- a/gdb/testsuite/gdb.base/jit-bfd-name.exp
+++ b/gdb/testsuite/gdb.base/jit-bfd-name.exp
@@ -46,7 +46,8 @@ if { [compile_jit_main ${main_srcfile} ${main_binfile} {}] != 0 } {
return
}
-clean_restart $::main_binfile
+clean_restart
+gdb_load $::main_binfile
if { ![runto_main] } {
return
}
diff --git a/gdb/testsuite/gdb.base/jit-elf-fork.exp b/gdb/testsuite/gdb.base/jit-elf-fork.exp
index c1fa428..92e7dc6 100644
--- a/gdb/testsuite/gdb.base/jit-elf-fork.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-fork.exp
@@ -54,7 +54,8 @@ if { [compile_jit_main ${main_srcfile} ${main_binfile} {}] != 0 } {
# that the callers can continue execution until there.
proc do_setup { detach-on-fork follow-fork-mode } {
- clean_restart ${::main_binfile}
+ clean_restart
+ gdb_load $::main_binfile
gdb_test_no_output "set detach-on-fork ${detach-on-fork}"
gdb_test_no_output "set follow-fork-mode ${follow-fork-mode}"
diff --git a/gdb/testsuite/gdb.base/jit-elf-so.exp b/gdb/testsuite/gdb.base/jit-elf-so.exp
index c227748..8f16bdb 100644
--- a/gdb/testsuite/gdb.base/jit-elf-so.exp
+++ b/gdb/testsuite/gdb.base/jit-elf-so.exp
@@ -73,7 +73,8 @@ proc one_jit_test {solib_binfiles_target match_str} {
global main_loader_binfile main_loader_srcfile
global main_solib_binfile main_solib_binfile_target main_solib_srcfile
- clean_restart $main_loader_binfile
+ clean_restart
+ gdb_load $main_loader_binfile
gdb_locate_shlib $main_solib_binfile
# This is just to help debugging when things fail
diff --git a/gdb/testsuite/gdb.base/jit-elf.exp b/gdb/testsuite/gdb.base/jit-elf.exp
index a519565..2dc67a5 100644
--- a/gdb/testsuite/gdb.base/jit-elf.exp
+++ b/gdb/testsuite/gdb.base/jit-elf.exp
@@ -48,7 +48,8 @@ proc clean_reattach {} {
gdb_test_no_output "set var wait_for_gdb = 1"
gdb_test "detach" "Detaching from .*"
- clean_restart ${main_binfile}
+ clean_restart
+ gdb_load $main_binfile
if { ![gdb_attach $testpid \
-pattern "main.*at .*$::main_basename.c:.*"] } {
@@ -84,7 +85,8 @@ proc one_jit_test {jit_solibs_target match_str reattach} {
global test_verbose
global main_binfile main_srcfile
- clean_restart ${main_binfile}
+ clean_restart
+ gdb_load $main_binfile
# This is just to help debugging when things fail
if {$test_verbose > 0} {
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index 55a274c..f577dba 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -106,7 +106,8 @@ proc jit_test_reread {standalone change_addr} {
clean_restart
gdb_load $binfile
} else {
- clean_restart $binfile_dl
+ clean_restart
+ gdb_load $binfile_dl
}
runto_main
@@ -176,7 +177,8 @@ foreach standalone {1 0} {
# see JIT breakpoints defined for both.
with_test_prefix "two JITers" {
- clean_restart $binfile_dl2
+ clean_restart
+ gdb_load $binfile_dl2
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.base/macro-source-path.exp b/gdb/testsuite/gdb.base/macro-source-path.exp
index 47d99aa..9c84227 100644
--- a/gdb/testsuite/gdb.base/macro-source-path.exp
+++ b/gdb/testsuite/gdb.base/macro-source-path.exp
@@ -53,7 +53,8 @@ proc test { src name } {
return
}
- clean_restart [host_file_normalize $binfile]
+ clean_restart
+ gdb_load [host_file_normalize $binfile]
if { ![runto_main] } {
return
diff --git a/gdb/testsuite/gdb.base/max-depth.exp.tcl b/gdb/testsuite/gdb.base/max-depth.exp.tcl
index fcec47b..a57e3cc 100644
--- a/gdb/testsuite/gdb.base/max-depth.exp.tcl
+++ b/gdb/testsuite/gdb.base/max-depth.exp.tcl
@@ -30,7 +30,7 @@ proc compile_and_run_tests { lang } {
lappend flags "additional_flags=-std=c++11"
}
- if { [prepare_for_testing "failed to prepare" "${binfile}" "${srcfile}" "${flags}"] } {
+ if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
return 0
}
diff --git a/gdb/testsuite/gdb.base/readnever.exp b/gdb/testsuite/gdb.base/readnever.exp
index 6dfd576..891adf5 100644
--- a/gdb/testsuite/gdb.base/readnever.exp
+++ b/gdb/testsuite/gdb.base/readnever.exp
@@ -26,7 +26,7 @@ if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
save_vars { GDBFLAGS } {
append GDBFLAGS " --readnever"
- if { [clean_restart ${binfile}] == -1 } {
+ if { [clean_restart $testfile] == -1 } {
return -1
}
}
diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/rtld-step.exp
index 242cd47..d1e240b 100644
--- a/gdb/testsuite/gdb.base/rtld-step.exp
+++ b/gdb/testsuite/gdb.base/rtld-step.exp
@@ -114,7 +114,8 @@ if { [gdb_compile ${srcfile_main} ${binfile_main} executable $main_flags] != ""
return -1
}
-clean_restart ${binfile_main}
+clean_restart
+gdb_load $binfile_main
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp
index 016e5eb..0c84cf9 100644
--- a/gdb/testsuite/gdb.base/skip.exp
+++ b/gdb/testsuite/gdb.base/skip.exp
@@ -309,7 +309,8 @@ with_test_prefix "step using -fi + -fu" {
with_test_prefix "skip delete completion" {
global binfile
- clean_restart "${binfile}"
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return
}
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp
index 31a45b5..fa7f786 100644
--- a/gdb/testsuite/gdb.base/structs.exp
+++ b/gdb/testsuite/gdb.base/structs.exp
@@ -56,7 +56,7 @@ proc start_structs_test { types } {
}
set binfile [standard_output_file ${testfile}]
- if { [prepare_for_testing "failed to prepare" $binfile $srcfile $flags] } {
+ if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
return -1
}
diff --git a/gdb/testsuite/gdb.base/structs2.exp b/gdb/testsuite/gdb.base/structs2.exp
index 8ccd50d..f377022 100644
--- a/gdb/testsuite/gdb.base/structs2.exp
+++ b/gdb/testsuite/gdb.base/structs2.exp
@@ -15,7 +15,7 @@
standard_testfile .c
-if { [prepare_for_testing "failed to prepare" $binfile $srcfile {debug}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
return -1
}
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 3dde79a..6ab16ca 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -77,7 +77,7 @@ proc run_style_tests { } {
# Restart GDB with the correct TERM variable setting, this
# means that GDB will enable styling.
- clean_restart_and_disable "restart 1" ${binfile}
+ clean_restart_and_disable "restart 1" $::testfile
set readnow [readnow]
@@ -358,7 +358,7 @@ proc test_disable_disassembler_styling { } {
# Restart GDB with the correct TERM variable setting, this
# means that GDB will enable styling.
- clean_restart_and_disable "restart 3" $::binfile
+ clean_restart_and_disable "restart 3" $::testfile
set styled_hex [limited_style $::hex address]
set main [limited_style main function]
@@ -473,7 +473,7 @@ proc test_disassembler_error_handling { } {
# Restart GDB with the correct TERM variable setting, this
# means that GDB will enable styling.
- clean_restart_and_disable "restart 4" $::binfile
+ clean_restart_and_disable "restart 4" $::testfile
# Disable use of libopcodes for styling. As this function is
# only called when Python Pygments module is available, we
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 6570fdb..13febda 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -61,7 +61,8 @@ if {[gdb_compile_shlib $libsrc $lib_so {debug}] != ""} {
return
}
-if {[prepare_for_testing "failed to prepare" $binfile "$srcfile $srcfile2" $exec_opts]} {
+if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
+ $exec_opts] } {
return
}
diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp
index fb7a584..59cd33c 100644
--- a/gdb/testsuite/gdb.base/testenv.exp
+++ b/gdb/testsuite/gdb.base/testenv.exp
@@ -27,7 +27,7 @@ standard_testfile .c
# Compile binary
# and start with a fresh gdb
-if { [prepare_for_testing "failed to prepare" ${binfile} ${srcfile}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return -1
}
diff --git a/gdb/testsuite/gdb.base/tls-nothreads.exp b/gdb/testsuite/gdb.base/tls-nothreads.exp
index 0be78a2..c7b1476 100644
--- a/gdb/testsuite/gdb.base/tls-nothreads.exp
+++ b/gdb/testsuite/gdb.base/tls-nothreads.exp
@@ -106,7 +106,8 @@ proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
set objcopy [gdb_find_objcopy]
set cmd "$objcopy --strip-debug ${::binfile} $binfile_stripped"
if ![catch "exec $cmd" cmd_output] {
- clean_restart $binfile_stripped
+ clean_restart
+ gdb_load $binfile_stripped
if ![runto_main] {
return
}