[binutils-gdb] [gdb/testsuite] Fix clean_restart <absolute filename> in gdb.base, part 2
Tom de Vries
vries@sourceware.org
Fri Sep 5 13:36:42 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2e61486fcefe8812714dcb0fb787581592675502
commit 2e61486fcefe8812714dcb0fb787581592675502
Author: Tom de Vries <tdevries@suse.de>
Date: Fri Sep 5 15:36:23 2025 +0200
[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.
Diff:
---
.../gdb.base/backtrace-through-cu-nodebug.exp | 3 ++-
gdb/testsuite/gdb.base/bp-cond-failure.exp | 2 +-
gdb/testsuite/gdb.base/break-fun-addr.exp | 3 ++-
gdb/testsuite/gdb.base/break-idempotent.exp | 2 +-
gdb/testsuite/gdb.base/call-sc.exp | 2 +-
gdb/testsuite/gdb.base/cli-suppress-notification.exp | 2 +-
gdb/testsuite/gdb.base/condbreak-bad.exp | 2 +-
gdb/testsuite/gdb.base/cvexpr.exp | 2 +-
gdb/testsuite/gdb.base/detach-sysroot-target.exp | 2 +-
gdb/testsuite/gdb.base/foll-exec.exp.tcl | 18 ++++++++++++------
gdb/testsuite/gdb.base/gcore-relro-pie.exp | 3 ++-
gdb/testsuite/gdb.base/gcore-tls-pie.exp | 3 ++-
gdb/testsuite/gdb.base/gdb-index-err.exp | 6 ++++--
gdb/testsuite/gdb.base/gnu-ifunc.exp | 6 ++++--
gdb/testsuite/gdb.base/info-program.exp | 3 ++-
gdb/testsuite/gdb.base/jit-bfd-name.exp | 3 ++-
gdb/testsuite/gdb.base/jit-elf-fork.exp | 3 ++-
gdb/testsuite/gdb.base/jit-elf-so.exp | 3 ++-
gdb/testsuite/gdb.base/jit-elf.exp | 6 ++++--
gdb/testsuite/gdb.base/jit-reader-simple.exp | 6 ++++--
gdb/testsuite/gdb.base/macro-source-path.exp | 3 ++-
gdb/testsuite/gdb.base/max-depth.exp.tcl | 2 +-
gdb/testsuite/gdb.base/readnever.exp | 2 +-
gdb/testsuite/gdb.base/rtld-step.exp | 3 ++-
gdb/testsuite/gdb.base/skip.exp | 3 ++-
gdb/testsuite/gdb.base/structs.exp | 2 +-
gdb/testsuite/gdb.base/structs2.exp | 2 +-
gdb/testsuite/gdb.base/style.exp | 6 +++---
gdb/testsuite/gdb.base/sym-file.exp | 3 ++-
gdb/testsuite/gdb.base/testenv.exp | 2 +-
gdb/testsuite/gdb.base/tls-nothreads.exp | 3 ++-
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 fce6d679b89..5f5432ca9c0 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 53885227c70..f33092b5132 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 9f5325ad8a9..ba6e32e9df7 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 ed23b64d0a9..3b32c89772d 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 4d0fccc2f5c..f67670dccc5 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 19f9c558e45..6880d983a4d 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 7aff409a31e..19c16dc3c52 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 3e527dbe825..e2f8c357a13 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 4248c8688a3..c7466c04f75 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 8f96a55fda4..64bcea857f8 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 1f27a0b5079..641caf1b798 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 1ad9b5547b1..a8f7366c7a1 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 973248ad8f6..b35383649b7 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 20a09973425..f134a0f1d9b 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 5a47e1e8cf1..da24880c2e9 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 219929b3f2f..756a38b00f4 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 c1fa4283362..92e7dc67971 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 c227748f03e..8f16bdb9623 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 a519565ea4c..2dc67a517be 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 55a274c08a6..f577dba31b9 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 47d99aab06a..9c842279df2 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 fcec47b3be0..a57e3ccd206 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 6dfd57658b1..891adf53a54 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 242cd477768..d1e240b07a7 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 016e5eb0bef..0c84cf90127 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 31a45b521e4..fa7f7867b9f 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 8ccd50dbaf4..f377022cc21 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 3dde79af323..6ab16ca9e01 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 6570fdb7a3b..13febdac2db 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 fb7a584bd46..59cd33c527b 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 0be78a2b6f5..c7b147616de 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
}
More information about the Gdb-cvs
mailing list