aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-09-02 14:42:05 +0200
committerTom de Vries <tdevries@suse.de>2025-09-02 14:42:05 +0200
commit123365d04655abc19425e3798b64bccc35a3fa15 (patch)
tree7898eeefb60da28d407972161c8fcc3d2266f1cd /gdb/testsuite
parent8c6dabdd2d6bb52ae7e4d394b147f5b823f7db49 (diff)
downloadbinutils-123365d04655abc19425e3798b64bccc35a3fa15.zip
binutils-123365d04655abc19425e3798b64bccc35a3fa15.tar.gz
binutils-123365d04655abc19425e3798b64bccc35a3fa15.tar.bz2
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.threads
Fix clean_restart <absolute filename> in the test-cases in gdb.threads. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/async.exp2
-rw-r--r--gdb/testsuite/gdb.threads/attach-non-stop.exp2
-rw-r--r--gdb/testsuite/gdb.threads/attach-stopped.exp2
-rw-r--r--gdb/testsuite/gdb.threads/bp_in_thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/break-while-running.exp2
-rw-r--r--gdb/testsuite/gdb.threads/check-libthread-db.exp6
-rw-r--r--gdb/testsuite/gdb.threads/detach-step-over.exp2
-rw-r--r--gdb/testsuite/gdb.threads/execl.exp2
-rw-r--r--gdb/testsuite/gdb.threads/foll-fork-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/fork-child-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/fork-thread-pending.exp4
-rw-r--r--gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp4
-rw-r--r--gdb/testsuite/gdb.threads/hand-call-in-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/inf-thr-count.exp2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp2
-rw-r--r--gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp2
-rw-r--r--gdb/testsuite/gdb.threads/info-threads-options.exp2
-rw-r--r--gdb/testsuite/gdb.threads/interrupt-while-step-over.exp2
-rw-r--r--gdb/testsuite/gdb.threads/interrupted-hand-call.exp2
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp2
-rw-r--r--gdb/testsuite/gdb.threads/leader-exit-attach.exp2
-rw-r--r--gdb/testsuite/gdb.threads/linux-dp.exp2
-rw-r--r--gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp2
-rw-r--r--gdb/testsuite/gdb.threads/manythreads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/multi-create.exp2
-rw-r--r--gdb/testsuite/gdb.threads/multiple-successive-infcall.exp2
-rw-r--r--gdb/testsuite/gdb.threads/next-bp-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/next-fork-other-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pending-fork-event-detach.exp3
-rw-r--r--gdb/testsuite/gdb.threads/pending-step.exp2
-rw-r--r--gdb/testsuite/gdb.threads/print-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-detaching.exp12
-rw-r--r--gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pthread_cond_wait.exp2
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/queue-signal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-new-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/schedlock-thread-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/signal-sigtrap.exp2
-rw-r--r--gdb/testsuite/gdb.threads/sigthread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.exp4
-rw-r--r--gdb/testsuite/gdb.threads/step-N-all-progress.exp2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-exec.exp3
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/step-over-thread-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/stepi-over-clone.exp2
-rw-r--r--gdb/testsuite/gdb.threads/switch-threads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-bp-deleted.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-execl.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-find.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific-bp.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-specific.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread-unwindonsignal.exp2
-rw-r--r--gdb/testsuite/gdb.threads/thread_check.exp2
-rw-r--r--gdb/testsuite/gdb.threads/threadapply.exp6
-rw-r--r--gdb/testsuite/gdb.threads/threadcrash.exp4
-rw-r--r--gdb/testsuite/gdb.threads/threxit-hop-specific.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-core.exp4
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug-pie.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-nodebug.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-shared.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls-so_extern.exp2
-rw-r--r--gdb/testsuite/gdb.threads/tls.exp2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp2
-rw-r--r--gdb/testsuite/gdb.threads/vfork-multi-thread.exp2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads.exp2
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads2.exp2
-rw-r--r--gdb/testsuite/gdb.threads/wp-replication.exp2
78 files changed, 95 insertions, 91 deletions
diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
index fec31c3..6846b38 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
@@ -51,7 +51,7 @@ proc test { non_stop } {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart ${binfile}
+ clean_restart ${::testfile}
}
if ![runto setup_done] {
diff --git a/gdb/testsuite/gdb.threads/async.exp b/gdb/testsuite/gdb.threads/async.exp
index b1e562a..6347333 100644
--- a/gdb/testsuite/gdb.threads/async.exp
+++ b/gdb/testsuite/gdb.threads/async.exp
@@ -32,7 +32,7 @@ proc test_current_thread {expected_thr} {
global gdb_prompt
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto "all_started"]} {
return
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.exp b/gdb/testsuite/gdb.threads/attach-non-stop.exp
index 9404edd..b8da5b1 100644
--- a/gdb/testsuite/gdb.threads/attach-non-stop.exp
+++ b/gdb/testsuite/gdb.threads/attach-non-stop.exp
@@ -37,7 +37,7 @@ proc test {target_non_stop non_stop cmd} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop $target_non_stop\""
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart $binfile
+ clean_restart $::testfile
}
set test_spawn_id [spawn_wait_for_attach $binfile]
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index e628adf..a3926d9 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -43,7 +43,7 @@ proc corefunc { threadtype } {
# Stop the program
remote_exec build "kill -s STOP ${testpid}"
- clean_restart $binfile
+ clean_restart $::testfile
# Verify that we can attach to the stopped process.
diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.exp b/gdb/testsuite/gdb.threads/bp_in_thread.exp
index c63f179..5180c18 100644
--- a/gdb/testsuite/gdb.threads/bp_in_thread.exp
+++ b/gdb/testsuite/gdb.threads/bp_in_thread.exp
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
runto_main
diff --git a/gdb/testsuite/gdb.threads/break-while-running.exp b/gdb/testsuite/gdb.threads/break-while-running.exp
index fbc2b59..fb7994d 100644
--- a/gdb/testsuite/gdb.threads/break-while-running.exp
+++ b/gdb/testsuite/gdb.threads/break-while-running.exp
@@ -39,7 +39,7 @@ proc test { update_thread_list always_inserted non_stop } {
global gdb_prompt
global decimal
- clean_restart $binfile
+ clean_restart $::testfile
gdb_test_no_output "set non-stop $non_stop"
gdb_test_no_output "set breakpoint always-inserted $always_inserted"
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp
index b97ab49..6d63185 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.exp
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp
@@ -40,7 +40,7 @@ set initial_thread_re "($thread_re1|$thread_re2)"
with_test_prefix "user-initiated check" {
# User-initiated check with libthread_db not loaded.
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test "maint show check-libthread-db" \
"Whether to check libthread_db at load time is off."
@@ -85,7 +85,7 @@ with_test_prefix "automated load-time check" {
# Automated load-time check with NPTL possibly uninitialized.
with_test_prefix "libpthread.so possibly not initialized" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test_no_output "maint set check-libthread-db 1"
gdb_test_no_output "set debug libthread-db 1"
@@ -104,7 +104,7 @@ with_test_prefix "automated load-time check" {
# Automated load-time check with NPTL fully operational.
if { [can_spawn_for_attach] } {
with_test_prefix "libpthread.so fully initialized" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
gdb_test_no_output "maint set check-libthread-db 1"
gdb_test_no_output "set debug libthread-db 1"
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp
index 8a1cb29..1767464 100644
--- a/gdb/testsuite/gdb.threads/detach-step-over.exp
+++ b/gdb/testsuite/gdb.threads/detach-step-over.exp
@@ -66,7 +66,7 @@ proc start_gdb_for_test {condition_eval target_non_stop non_stop displaced} {
append ::GDBFLAGS " -ex \"set non-stop $non_stop\""
append ::GDBFLAGS " -ex \"set displaced $displaced\""
append ::GDBFLAGS " -ex \"set schedule-multiple on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set breakpoint condition-evaluation $condition_eval"
diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp
index 502d387..a42dce9 100644
--- a/gdb/testsuite/gdb.threads/execl.exp
+++ b/gdb/testsuite/gdb.threads/execl.exp
@@ -31,7 +31,7 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { [is_remote target] } {
gdb_remote_download target $binfile1
}
diff --git a/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp b/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
index 8ab540c..29ec34c 100644
--- a/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/foll-fork-other-thread.exp
@@ -46,7 +46,7 @@ proc do_test { fork_func follow target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/fork-child-threads.exp b/gdb/testsuite/gdb.threads/fork-child-threads.exp
index ba9dfc2..d1b413c 100644
--- a/gdb/testsuite/gdb.threads/fork-child-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-child-threads.exp
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
index 538e1ca..e0e3625 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.exp
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
@@ -75,7 +75,7 @@ gdb_test_multiple "info threads" "$test" {
# Start over, but this time, don't switch away from the fork event thread.
-clean_restart $binfile
+clean_restart $::testfile
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
index c668a65..d65fe83d 100644
--- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
@@ -37,7 +37,7 @@ proc probe_displaced_stepping_support {} {
global binfile gdb_prompt
with_test_prefix "probe displaced-stepping support" {
- clean_restart $binfile
+ clean_restart $::testfile
gdb_test_no_output "set displaced on"
if {![runto_main]} {
@@ -76,7 +76,7 @@ proc do_test { cond_bp_target detach_on_fork displaced } {
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop on\""]
- clean_restart $binfile
+ clean_restart $::testfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
index d1be1d0..fd934f5 100644
--- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
+++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
@@ -44,7 +44,7 @@ proc get_dummy_frame_number { } {
return ""
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.exp b/gdb/testsuite/gdb.threads/inf-thr-count.exp
index 61533ab..5272f5c 100644
--- a/gdb/testsuite/gdb.threads/inf-thr-count.exp
+++ b/gdb/testsuite/gdb.threads/inf-thr-count.exp
@@ -44,7 +44,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
# the inferior while it is running.
save_vars {GDBFLAGS} {
append GDBFLAGS { -ex "set non-stop on"}
- clean_restart $binfile
+ clean_restart $::testfile
}
if ![runto_main] {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
index 62a183c..35a1fe5 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp
@@ -53,7 +53,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
index 0f068c6..ed98998 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-simple.exp
@@ -42,7 +42,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
index c404a7d..bc12fb4 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-single.exp
@@ -38,7 +38,7 @@ proc start_gdb_and_runto_main { target_async target_non_stop } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
index 9dbaa4f..03c6959 100644
--- a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
+++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-timeout.exp
@@ -52,7 +52,7 @@ proc run_test { target_async target_non_stop non_stop other_thread_bp unwind } {
append ::GDBFLAGS " -ex \"maint non-stop $non_stop\""
append ::GDBFLAGS " -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/info-threads-options.exp b/gdb/testsuite/gdb.threads/info-threads-options.exp
index 38e4e67..e6c68e2 100644
--- a/gdb/testsuite/gdb.threads/info-threads-options.exp
+++ b/gdb/testsuite/gdb.threads/info-threads-options.exp
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $binfile
+ clean_restart $::testfile
}
if ![runto_main] {
diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
index 05587eb..44e4d64 100644
--- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
+++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
@@ -169,7 +169,7 @@ proc testdriver {displaced} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set displaced-stepping $displaced"
diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
index 3a2bc63..15c48b1 100644
--- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
+++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index b1cec80b0..1fa83af 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -62,7 +62,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_run_cmd
gdb_test "" "" "run program to completion"
diff --git a/gdb/testsuite/gdb.threads/leader-exit-attach.exp b/gdb/testsuite/gdb.threads/leader-exit-attach.exp
index 641d6b5..2df4a18 100644
--- a/gdb/testsuite/gdb.threads/leader-exit-attach.exp
+++ b/gdb/testsuite/gdb.threads/leader-exit-attach.exp
@@ -31,7 +31,7 @@ set testpid [spawn_id_get_pid $test_spawn_id]
# Wait a bit for the leader thread to exit, before attaching.
sleep 2
-clean_restart ${binfile}
+clean_restart ${::testfile}
# Save this early as we may not be able to talk with GDBserver anymore
# when we need to check it.
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 1652f78..35cc255 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -44,7 +44,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index 3006b83..a63f0be 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
diff --git a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
index 20e7bc4..1ce0194 100644
--- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
+++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
@@ -50,7 +50,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
proc run_test { spawn_inferior } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
# Setup the inferior. When complete the main thread (#1) will
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index ae51c5a..2cd296f 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/multi-create.exp b/gdb/testsuite/gdb.threads/multi-create.exp
index 966d44d..cb86aac 100644
--- a/gdb/testsuite/gdb.threads/multi-create.exp
+++ b/gdb/testsuite/gdb.threads/multi-create.exp
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
# Run to the beginning of create_function several times. Make sure
diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
index 1aa9253..2694ce5 100644
--- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
+++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp
@@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart "${binfile}"
+clean_restart "${::testfile}"
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
index cf8d687..6b696dd 100644
--- a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
@@ -28,7 +28,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile \
# Test all "set scheduler-locking" variants.
foreach schedlock {"off" "step" "on" } {
with_test_prefix "schedlock=$schedlock" {
- clean_restart $binfile
+ clean_restart $::testfile
if ![runto_main] {
continue
diff --git a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
index 3a97127..82e85a6 100644
--- a/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-fork-exec-other-thread.exp
@@ -67,7 +67,7 @@ proc do_test { fork_func target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/next-fork-other-thread.exp b/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
index 1cd6685..9349091 100644
--- a/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-fork-other-thread.exp
@@ -58,7 +58,7 @@ proc do_test { fork_func target-non-stop non-stop displaced-stepping } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}-${fork_func}
+ clean_restart ${::testfile}-${fork_func}
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
index 29a011e..9cc4978 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
@@ -52,7 +52,7 @@ proc do_test { } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { ![runto break_here_first] } {
diff --git a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
index e627241..fa86488 100644
--- a/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
+++ b/gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
@@ -93,7 +93,8 @@ proc do_test { target-non-stop who_forks fork_function stop_mode } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
- clean_restart $this_binfile
+ clean_restart
+ gdb_load $this_binfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/pending-step.exp b/gdb/testsuite/gdb.threads/pending-step.exp
index 1c2422e..d31f879 100644
--- a/gdb/testsuite/gdb.threads/pending-step.exp
+++ b/gdb/testsuite/gdb.threads/pending-step.exp
@@ -54,7 +54,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index 51a14b2..3d2dc14 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -32,7 +32,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
# Now we can proceed with the real testing.
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
#gdb_test_no_output "set print address off"
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
index 776c08e..6c6a4b1 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp
@@ -43,6 +43,7 @@
# threads are reaped. We test that as well.
standard_testfile
+set testfile_base $testfile
# Test that GDBserver exits.
@@ -214,7 +215,7 @@ proc test_detach {multi_process cmd} {
with_test_prefix "detach" {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -242,7 +243,7 @@ proc test_detach_watch {wp multi_process cmd} {
with_test_prefix "watchpoint:$wp" {
global binfile decimal
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -290,7 +291,7 @@ proc test_detach_killed_outside {multi_process cmd} {
with_test_prefix "killed outside" {
global binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -334,14 +335,15 @@ proc do_test {multi_process cmd} {
return
}
- set binfile [standard_output_file ${testfile}-$multi_process-$cmd]
+ set testfile $::testfile_base-$multi_process-$cmd
+ set binfile [standard_output_file $testfile]
set options {debug pthreads}
if {$multi_process} {
lappend options "additional_flags=-DMULTIPROCESS"
}
if {[build_executable "failed to build" \
- $testfile-$multi_process-$cmd $srcfile $options] == -1} {
+ $testfile $srcfile $options] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
index 26dc8cc..a990dc9 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
@@ -42,7 +42,7 @@ proc do_test { non_stop cond_bp_target } {
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set non-stop $non_stop\""]
- clean_restart $binfile
+ clean_restart $::testfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
index c1be1cd..e914db0 100644
--- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
@@ -25,7 +25,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
gdb_test "break break_me" \
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 0437e74..04ae91e2 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -34,7 +34,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
#gdb_test_no_output "set print address off"
diff --git a/gdb/testsuite/gdb.threads/queue-signal.exp b/gdb/testsuite/gdb.threads/queue-signal.exp
index f791ffa..34abc3b 100644
--- a/gdb/testsuite/gdb.threads/queue-signal.exp
+++ b/gdb/testsuite/gdb.threads/queue-signal.exp
@@ -20,7 +20,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if ![runto_main] {
return 0
diff --git a/gdb/testsuite/gdb.threads/schedlock-new-thread.exp b/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
index c398137..5fda4b8 100644
--- a/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
+++ b/gdb/testsuite/gdb.threads/schedlock-new-thread.exp
@@ -31,7 +31,7 @@ proc test {non-stop schedlock} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
set sl [expr $schedlock == "on" ? 1 : 0]
- clean_restart $::binfile-$sl
+ clean_restart $::testfile-$sl
}
set linenum1 [gdb_get_line_number "set break 1 here"]
diff --git a/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp b/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
index 434b058..137f652 100644
--- a/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/schedlock-thread-exit.exp
@@ -28,7 +28,7 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile} \
}
proc do_test { } {
- clean_restart $::binfile
+ clean_restart $::testfile
# One of the launched threads will report a stop on thread_func. Some
# others will also stop on thread_func and have a pending status.
diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
index 2586800..6d344e3 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
@@ -35,7 +35,7 @@ proc test { step_over } {
global srcfile binfile tdlabel_re
with_test_prefix "step-over $step_over" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
index 73f88c1..acb018b 100644
--- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
@@ -32,7 +32,7 @@ proc test { schedlock } {
global srcfile binfile tdlabel_re
with_test_prefix "schedlock $schedlock" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
index 7445cad..9de0908 100644
--- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
@@ -29,7 +29,7 @@ proc test { command } {
global srcfile binfile tdlabel_re
with_test_prefix "$command" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
index 8154ddf..849d628 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
@@ -32,7 +32,7 @@ proc test { sigtrap_thread } {
global srcfile binfile tdlabel_re
with_test_prefix "sigtrap thread $sigtrap_thread" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {![runto "thread_function"]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.threads/sigthread.exp
index 9d2f9b5..dea8eb8 100644
--- a/gdb/testsuite/gdb.threads/sigthread.exp
+++ b/gdb/testsuite/gdb.threads/sigthread.exp
@@ -24,7 +24,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp
index 0374666..bbe11ab 100644
--- a/gdb/testsuite/gdb.threads/staticthreads.exp
+++ b/gdb/testsuite/gdb.threads/staticthreads.exp
@@ -34,7 +34,7 @@ foreach_with_prefix have_tls { "-DHAVE_TLS" "" } {
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
@@ -94,7 +94,7 @@ gdb_test_multiple "quit" "$test" {
pass "$test"
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { "$have_tls" != "" } {
diff --git a/gdb/testsuite/gdb.threads/step-N-all-progress.exp b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
index c874d79..031e36a 100644
--- a/gdb/testsuite/gdb.threads/step-N-all-progress.exp
+++ b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
@@ -31,7 +31,7 @@ proc test {non-stop target-non-stop} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.threads/step-over-exec.exp b/gdb/testsuite/gdb.threads/step-over-exec.exp
index 7c553f2..b06f3a4 100644
--- a/gdb/testsuite/gdb.threads/step-over-exec.exp
+++ b/gdb/testsuite/gdb.threads/step-over-exec.exp
@@ -71,7 +71,8 @@ proc do_test { execr_thread different_text_segments displaced_stepping } {
return -1
}
- clean_restart ${execr_binfile}
+ clean_restart
+ gdb_load $execr_binfile
gdb_test_no_output "set displaced-stepping $displaced_stepping"
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
index cf10bdc..fdd2b27 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
@@ -29,7 +29,7 @@ if { [build_executable "failed to prepare" $testfile \
proc test {displaced-stepping target-non-stop} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
gdb_test_no_output "set displaced-stepping ${displaced-stepping}"
diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
index 31037a7..8ed2b21 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
@@ -55,7 +55,7 @@ proc test {step_over_mode non-stop target-non-stop schedlock cmd ns_stop_all} {
save_vars ::GDBFLAGS {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart $::binfile
+ clean_restart $::testfile
}
if { $step_over_mode == "none" } {
diff --git a/gdb/testsuite/gdb.threads/stepi-over-clone.exp b/gdb/testsuite/gdb.threads/stepi-over-clone.exp
index 5da123e..d6f1680 100644
--- a/gdb/testsuite/gdb.threads/stepi-over-clone.exp
+++ b/gdb/testsuite/gdb.threads/stepi-over-clone.exp
@@ -106,7 +106,7 @@ proc test {non_stop displaced third_thread} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
append GDBFLAGS " -ex \"set displaced $displaced\""
- clean_restart $binfile
+ clean_restart $::testfile
}
runto_main
diff --git a/gdb/testsuite/gdb.threads/switch-threads.exp b/gdb/testsuite/gdb.threads/switch-threads.exp
index d43603c..1f67a45 100644
--- a/gdb/testsuite/gdb.threads/switch-threads.exp
+++ b/gdb/testsuite/gdb.threads/switch-threads.exp
@@ -29,7 +29,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
diff --git a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
index 8cabb70..8001229 100644
--- a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
+++ b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
@@ -38,7 +38,7 @@ set is_remote \
# This test requires background execution, which relies on non-stop mode.
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"maint set target-non-stop on\""
- clean_restart ${binfile}
+ clean_restart ${::testfile}
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/thread-execl.exp b/gdb/testsuite/gdb.threads/thread-execl.exp
index 04ba518..13a6ef4 100644
--- a/gdb/testsuite/gdb.threads/thread-execl.exp
+++ b/gdb/testsuite/gdb.threads/thread-execl.exp
@@ -35,7 +35,7 @@ proc do_test { schedlock } {
set prefix "schedlock $schedlock"
}
with_test_prefix "$prefix" {
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if {$schedlock == "non-stop"} {
gdb_test_no_output "set non-stop 1"
diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.threads/thread-find.exp
index 456f7d3..171b94b 100644
--- a/gdb/testsuite/gdb.threads/thread-find.exp
+++ b/gdb/testsuite/gdb.threads/thread-find.exp
@@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
index c4858f2..8f48b61 100644
--- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
@@ -118,7 +118,7 @@ proc check_thread_specific_breakpoint {non_stop} {
foreach_with_prefix non_stop {on off} {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart $binfile
+ clean_restart $::testfile
}
check_thread_specific_breakpoint $non_stop
diff --git a/gdb/testsuite/gdb.threads/thread-specific.exp b/gdb/testsuite/gdb.threads/thread-specific.exp
index bf9c63b..d1e6f4d 100644
--- a/gdb/testsuite/gdb.threads/thread-specific.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific.exp
@@ -62,7 +62,7 @@ proc get_thread_list { } {
return $thr_list
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
index 5f4ac1f..dc74714 100644
--- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
+++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
@@ -28,7 +28,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp
index ee5f35a..9f92066 100644
--- a/gdb/testsuite/gdb.threads/thread_check.exp
+++ b/gdb/testsuite/gdb.threads/thread_check.exp
@@ -39,7 +39,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 1
diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp
index 9110617..34de561 100644
--- a/gdb/testsuite/gdb.threads/threadapply.exp
+++ b/gdb/testsuite/gdb.threads/threadapply.exp
@@ -25,7 +25,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
#
# Run to `main' where we begin our tests.
@@ -73,7 +73,7 @@ proc thr_apply_detach {thread_set} {
global binfile
global break_line
- clean_restart ${binfile}
+ clean_restart ${::testfile}
if ![runto_main] {
return -1
@@ -112,7 +112,7 @@ proc kill_and_remove_inferior {thread_set} {
set any "\[^\r\n\]*"
set ws "\[ \t\]\+"
- clean_restart ${binfile}
+ clean_restart ${::testfile}
with_test_prefix "start inferior 1" {
runto_main
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 15d2a20..76d2c6c 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -237,7 +237,7 @@ proc_with_prefix test_corefile {} {
proc_with_prefix test_gcore {} {
- clean_restart "$::binfile"
+ clean_restart "$::testfile"
gdb_test "handle SIGUSR1 nostop print pass" \
".*SIGUSR1.*No.*Yes.*Yes.*User defined signal 1" \
@@ -275,7 +275,7 @@ if [prepare_for_testing "failed to prepare" $testfile $srcfile \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set backtrace limit unlimited"
diff --git a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
index ce2df7c..b55e80c 100644
--- a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
+++ b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
@@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto_main
diff --git a/gdb/testsuite/gdb.threads/tls-core.exp b/gdb/testsuite/gdb.threads/tls-core.exp
index 96b1c6a..587ae61 100644
--- a/gdb/testsuite/gdb.threads/tls-core.exp
+++ b/gdb/testsuite/gdb.threads/tls-core.exp
@@ -27,7 +27,7 @@ set core_supported [expr {$corefile != ""}]
# Generate a core file with "gcore".
-clean_restart ${binfile}
+clean_restart ${::testfile}
runto thread_proc
@@ -43,7 +43,7 @@ proc tls_core_test {supported corefile} {
upvar host_triplet host_triplet
upvar binfile binfile
- clean_restart ${binfile}
+ clean_restart ${::testfile}
set test "load core file"
if {$supported} {
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
index 01abcfa..44c12f5 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
@@ -20,7 +20,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.exp b/gdb/testsuite/gdb.threads/tls-nodebug.exp
index ebfa752..971f26c 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug.exp
@@ -26,7 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/tls-shared.exp
index 35596bc..b7fa965 100644
--- a/gdb/testsuite/gdb.threads/tls-shared.exp
+++ b/gdb/testsuite/gdb.threads/tls-shared.exp
@@ -29,7 +29,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_li
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gdb.threads/tls-so_extern.exp
index 3cef672..a0aa5f8 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern.exp
+++ b/gdb/testsuite/gdb.threads/tls-so_extern.exp
@@ -28,7 +28,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_li
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_load_shlib ${binfile_lib}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index 73fada7..4b43387 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -153,7 +153,7 @@ proc check_thread_stack {number spin_threads spin_threads_level} {
}
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_multiple "print a_thread_local" "" {
-re -wrap "Cannot find thread-local variables on this target" {
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
index 0b95a75..7c2b309 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
@@ -30,7 +30,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]}
proc test_vfork {detach} {
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
index ced52df..a5e7475 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
@@ -30,7 +30,7 @@ if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]}
proc test_vfork {detach} {
global binfile
- clean_restart $binfile
+ clean_restart $::testfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-thread.exp b/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
index 61811ae..fce974b 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-thread.exp
@@ -59,7 +59,7 @@ proc do_test { target-non-stop non-stop follow-fork-mode detach-on-fork schedule
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop ${target-non-stop}\""
append ::GDBFLAGS " -ex \"set non-stop ${non-stop}\""
- clean_restart ${::binfile}
+ clean_restart ${::testfile}
}
gdb_test_no_output "set follow-fork-mode ${follow-fork-mode}"
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index 49fc762..f3ec7f4 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart $binfile
+clean_restart $::testfile
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
#
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index 2426be4..19a60e4 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
gdb_test_no_output "set can-use-hw-watchpoints 1" ""
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index 68f5eb0..8a5f95d 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -34,7 +34,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart ${::testfile}
# Force hardware watchpoints to be used.
gdb_test_no_output "set can-use-hw-watchpoints 1" ""