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
commit202beb3feebd44fbc1979d9fdb4d74c44e16a417 (patch)
treed98dfc57b9f3b8116b19d6b66f4b38d174feb74e
parent3e1716c9fc203f5654d49c17b160a466c78a2a2c (diff)
downloadbinutils-202beb3feebd44fbc1979d9fdb4d74c44e16a417.zip
binutils-202beb3feebd44fbc1979d9fdb4d74c44e16a417.tar.gz
binutils-202beb3feebd44fbc1979d9fdb4d74c44e16a417.tar.bz2
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.base, part 1
Run: ... $ find gdb/testsuite/gdb.base/ -name *.exp* \ | xargs sed -i 's/^\([ \t]*\)clean_restart $binfile$/\1clean_restart\n\1gdb_load $binfile/' $ find gdb/testsuite/gdb.base/ -name *.exp* \ | xargs sed -i 's/^\([ \t]*\)clean_restart ${binfile}$/\1clean_restart\n\1gdb_load $binfile/' $ find gdb/testsuite/gdb.base/ -name *.exp* \ | xargs sed -i 's/^\([ \t]*\)clean_restart $::binfile$/\1clean_restart\n\1gdb_load $::binfile/' $ find gdb/testsuite/gdb.base/ -name *.exp* \ | xargs sed -i 's/^\([ \t]*\)clean_restart ${::binfile}$/\1clean_restart\n\1gdb_load $::binfile/' ... Revert the change in test-case gdb.base/foll-vfork.exp, which does 'set binfile $testfile'. Tested on x86_64-linux. The only modified test-case I was not able to test is gdb.base/dtrace-probe.exp (filed PR testsuite/33379 about this). The change in the test-case is trivial though.
-rw-r--r--gdb/testsuite/gdb.base/access-mem-running.exp3
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp3
-rw-r--r--gdb/testsuite/gdb.base/args.exp3
-rw-r--r--gdb/testsuite/gdb.base/arrayidx.exp3
-rw-r--r--gdb/testsuite/gdb.base/assign.exp3
-rw-r--r--gdb/testsuite/gdb.base/attach-fail-twice.exp3
-rw-r--r--gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp6
-rw-r--r--gdb/testsuite/gdb.base/attach-wait-input.exp3
-rw-r--r--gdb/testsuite/gdb.base/attach.exp9
-rw-r--r--gdb/testsuite/gdb.base/auxv.exp3
-rw-r--r--gdb/testsuite/gdb.base/basic-edit-cmd.exp3
-rw-r--r--gdb/testsuite/gdb.base/bfp-test.exp3
-rw-r--r--gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp3
-rw-r--r--gdb/testsuite/gdb.base/bg-execution-repeat.exp3
-rw-r--r--gdb/testsuite/gdb.base/bigcore.exp3
-rw-r--r--gdb/testsuite/gdb.base/bitfields2.exp3
-rw-r--r--gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp6
-rw-r--r--gdb/testsuite/gdb.base/bp-cond-failure.exp3
-rw-r--r--gdb/testsuite/gdb.base/bp-disabled-by-cond.exp3
-rw-r--r--gdb/testsuite/gdb.base/bp-permanent.exp3
-rw-r--r--gdb/testsuite/gdb.base/bt-on-fatal-signal.exp3
-rw-r--r--gdb/testsuite/gdb.base/bt-selected-frame.exp3
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp3
-rw-r--r--gdb/testsuite/gdb.base/call-signal-resume.exp3
-rw-r--r--gdb/testsuite/gdb.base/callexit.exp3
-rw-r--r--gdb/testsuite/gdb.base/catch-syscall.exp12
-rw-r--r--gdb/testsuite/gdb.base/checkpoint.exp6
-rw-r--r--gdb/testsuite/gdb.base/chng-syms.exp3
-rw-r--r--gdb/testsuite/gdb.base/clear_non_user_bp.exp3
-rw-r--r--gdb/testsuite/gdb.base/code-expr.exp3
-rw-r--r--gdb/testsuite/gdb.base/cond-expr.exp3
-rw-r--r--gdb/testsuite/gdb.base/condbreak-multi-context.exp15
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp3
-rw-r--r--gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp3
-rw-r--r--gdb/testsuite/gdb.base/corefile-exec-context.exp9
-rw-r--r--gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp6
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp12
-rw-r--r--gdb/testsuite/gdb.base/corefile2.exp6
-rw-r--r--gdb/testsuite/gdb.base/corefile3.exp3
-rw-r--r--gdb/testsuite/gdb.base/default-args.exp3
-rw-r--r--gdb/testsuite/gdb.base/detach-while-running.exp3
-rw-r--r--gdb/testsuite/gdb.base/detach.exp3
-rw-r--r--gdb/testsuite/gdb.base/dfp-test.exp3
-rw-r--r--gdb/testsuite/gdb.base/display.exp3
-rw-r--r--gdb/testsuite/gdb.base/dlmopen-ns-ids.exp12
-rw-r--r--gdb/testsuite/gdb.base/dlmopen.exp12
-rw-r--r--gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp3
-rw-r--r--gdb/testsuite/gdb.base/dprintf-detach.exp6
-rw-r--r--gdb/testsuite/gdb.base/dprintf-execution-x-script.exp3
-rw-r--r--gdb/testsuite/gdb.base/dprintf-pending.exp3
-rw-r--r--gdb/testsuite/gdb.base/dprintf.exp3
-rw-r--r--gdb/testsuite/gdb.base/dso2dso.exp3
-rw-r--r--gdb/testsuite/gdb.base/dtrace-probe.exp3
-rw-r--r--gdb/testsuite/gdb.base/dump.exp3
-rw-r--r--gdb/testsuite/gdb.base/duplicate-bp.exp3
-rw-r--r--gdb/testsuite/gdb.base/eh_return.exp3
-rw-r--r--gdb/testsuite/gdb.base/errno.exp6
-rw-r--r--gdb/testsuite/gdb.base/eval-skip.exp3
-rw-r--r--gdb/testsuite/gdb.base/exe-lock.exp3
-rw-r--r--gdb/testsuite/gdb.base/exec-invalid-sysroot.exp3
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp3
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp3
-rw-r--r--gdb/testsuite/gdb.base/find.exp3
-rw-r--r--gdb/testsuite/gdb.base/fixsection.exp3
-rw-r--r--gdb/testsuite/gdb.base/float128.exp3
-rw-r--r--gdb/testsuite/gdb.base/floatn.exp3
-rw-r--r--gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp3
-rw-r--r--gdb/testsuite/gdb.base/fork-print-inferior-events.exp3
-rw-r--r--gdb/testsuite/gdb.base/frame-args.exp3
-rw-r--r--gdb/testsuite/gdb.base/frame-info-consistent.exp3
-rw-r--r--gdb/testsuite/gdb.base/frame-view.exp3
-rw-r--r--gdb/testsuite/gdb.base/fullname.exp9
-rw-r--r--gdb/testsuite/gdb.base/gcore-buffer-overflow.exp3
-rw-r--r--gdb/testsuite/gdb.base/gcore-relro-pie.exp3
-rw-r--r--gdb/testsuite/gdb.base/gcore-relro.exp6
-rw-r--r--gdb/testsuite/gdb.base/gcore-tls-pie.exp3
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp3
-rw-r--r--gdb/testsuite/gdb.base/gdb1250.exp3
-rw-r--r--gdb/testsuite/gdb.base/gdb1555.exp3
-rw-r--r--gdb/testsuite/gdb.base/gdbindex-stabs.exp3
-rw-r--r--gdb/testsuite/gdb.base/global-var-nested-by-dso.exp3
-rw-r--r--gdb/testsuite/gdb.base/gnu_vector.exp3
-rw-r--r--gdb/testsuite/gdb.base/hashline1.exp3
-rw-r--r--gdb/testsuite/gdb.base/hashline2.exp3
-rw-r--r--gdb/testsuite/gdb.base/hashline3.exp3
-rw-r--r--gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp3
-rw-r--r--gdb/testsuite/gdb.base/hook-stop.exp3
-rw-r--r--gdb/testsuite/gdb.base/huge.exp3
-rw-r--r--gdb/testsuite/gdb.base/infcall-exec.exp3
-rw-r--r--gdb/testsuite/gdb.base/infcall-failure.exp3
-rw-r--r--gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl3
-rw-r--r--gdb/testsuite/gdb.base/infcall-timeout.exp3
-rw-r--r--gdb/testsuite/gdb.base/inferior-args.exp3
-rw-r--r--gdb/testsuite/gdb.base/inferior-died.exp3
-rw-r--r--gdb/testsuite/gdb.base/info-proc.exp3
-rw-r--r--gdb/testsuite/gdb.base/info_sources_2.exp3
-rw-r--r--gdb/testsuite/gdb.base/internal-string-values.exp3
-rw-r--r--gdb/testsuite/gdb.base/interrupt-daemon-attach.exp6
-rw-r--r--gdb/testsuite/gdb.base/interrupt-daemon.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-reader-exec.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-reader-simple.exp3
-rw-r--r--gdb/testsuite/gdb.base/kill-during-detach.exp3
-rw-r--r--gdb/testsuite/gdb.base/killed-outside.exp3
-rw-r--r--gdb/testsuite/gdb.base/langs.exp3
-rw-r--r--gdb/testsuite/gdb.base/lineinc.exp3
-rw-r--r--gdb/testsuite/gdb.base/list-missing-source.exp3
-rw-r--r--gdb/testsuite/gdb.base/list.exp9
-rw-r--r--gdb/testsuite/gdb.base/logical.exp3
-rw-r--r--gdb/testsuite/gdb.base/long_long.exp3
-rw-r--r--gdb/testsuite/gdb.base/longjmp.exp3
-rw-r--r--gdb/testsuite/gdb.base/macscp.exp3
-rw-r--r--gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp3
-rw-r--r--gdb/testsuite/gdb.base/maint.exp3
-rw-r--r--gdb/testsuite/gdb.base/miscexprs.exp3
-rw-r--r--gdb/testsuite/gdb.base/multi-forks.exp9
-rw-r--r--gdb/testsuite/gdb.base/nodebug.exp3
-rw-r--r--gdb/testsuite/gdb.base/nofield.exp3
-rw-r--r--gdb/testsuite/gdb.base/nostdlib.exp3
-rw-r--r--gdb/testsuite/gdb.base/options.exp6
-rw-r--r--gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp3
-rw-r--r--gdb/testsuite/gdb.base/paginate-bg-execution.exp3
-rw-r--r--gdb/testsuite/gdb.base/paginate-inferior-exit.exp3
-rw-r--r--gdb/testsuite/gdb.base/patch.exp6
-rw-r--r--gdb/testsuite/gdb.base/pc-not-saved.exp3
-rw-r--r--gdb/testsuite/gdb.base/pie-fork.exp3
-rw-r--r--gdb/testsuite/gdb.base/pointers.exp3
-rw-r--r--gdb/testsuite/gdb.base/pr11022.exp3
-rw-r--r--gdb/testsuite/gdb.base/print-symbol-loading.exp6
-rw-r--r--gdb/testsuite/gdb.base/prologue.exp3
-rw-r--r--gdb/testsuite/gdb.base/ptr-typedef.exp3
-rw-r--r--gdb/testsuite/gdb.base/quit-live.exp3
-rw-r--r--gdb/testsuite/gdb.base/random-signal.exp6
-rw-r--r--gdb/testsuite/gdb.base/readline-ask.exp3
-rw-r--r--gdb/testsuite/gdb.base/readline-commands-eof.exp3
-rw-r--r--gdb/testsuite/gdb.base/relativedebug.exp3
-rw-r--r--gdb/testsuite/gdb.base/remote.exp3
-rw-r--r--gdb/testsuite/gdb.base/reread.exp3
-rw-r--r--gdb/testsuite/gdb.base/restore.exp3
-rw-r--r--gdb/testsuite/gdb.base/return2.exp3
-rw-r--r--gdb/testsuite/gdb.base/run-attach-while-running.exp3
-rw-r--r--gdb/testsuite/gdb.base/run-control-while-bg-execution.exp3
-rw-r--r--gdb/testsuite/gdb.base/run-fail-twice.exp3
-rw-r--r--gdb/testsuite/gdb.base/savedregs.exp3
-rw-r--r--gdb/testsuite/gdb.base/sep.exp6
-rw-r--r--gdb/testsuite/gdb.base/sepsymtab.exp3
-rw-r--r--gdb/testsuite/gdb.base/set-cwd.exp6
-rw-r--r--gdb/testsuite/gdb.base/set-inferior-tty.exp3
-rw-r--r--gdb/testsuite/gdb.base/setshow.exp6
-rw-r--r--gdb/testsuite/gdb.base/settings.exp3
-rw-r--r--gdb/testsuite/gdb.base/share-env-with-gdbserver.exp12
-rw-r--r--gdb/testsuite/gdb.base/shlib-call.exp6
-rw-r--r--gdb/testsuite/gdb.base/shlib-unload.exp12
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp3
-rw-r--r--gdb/testsuite/gdb.base/sigaltstack.exp3
-rw-r--r--gdb/testsuite/gdb.base/sigchld.exp3
-rw-r--r--gdb/testsuite/gdb.base/siginfo-obj.exp3
-rw-r--r--gdb/testsuite/gdb.base/siginfo-thread.exp6
-rw-r--r--gdb/testsuite/gdb.base/signals-state-child.exp3
-rw-r--r--gdb/testsuite/gdb.base/signals.exp3
-rw-r--r--gdb/testsuite/gdb.base/signull.exp3
-rw-r--r--gdb/testsuite/gdb.base/sigrepeat.exp3
-rw-r--r--gdb/testsuite/gdb.base/sigstep.exp3
-rw-r--r--gdb/testsuite/gdb.base/so-impl-ld.exp3
-rw-r--r--gdb/testsuite/gdb.base/solib-abort.exp3
-rw-r--r--gdb/testsuite/gdb.base/solib-disc.exp3
-rw-r--r--gdb/testsuite/gdb.base/solib-symbol.exp3
-rw-r--r--gdb/testsuite/gdb.base/solib-weak.exp3
-rw-r--r--gdb/testsuite/gdb.base/source-dir.exp3
-rw-r--r--gdb/testsuite/gdb.base/stack-checking.exp3
-rw-r--r--gdb/testsuite/gdb.base/startup-with-shell.exp3
-rw-r--r--gdb/testsuite/gdb.base/step-over-no-symbols.exp3
-rw-r--r--gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp3
-rw-r--r--gdb/testsuite/gdb.base/step-test.exp3
-rw-r--r--gdb/testsuite/gdb.base/style.exp9
-rw-r--r--gdb/testsuite/gdb.base/sym-file.exp3
-rw-r--r--gdb/testsuite/gdb.base/symtab-search-order.exp3
-rw-r--r--gdb/testsuite/gdb.base/testenv.exp6
-rw-r--r--gdb/testsuite/gdb.base/tls-dlobj.exp6
-rw-r--r--gdb/testsuite/gdb.base/tls-multiobj.exp6
-rw-r--r--gdb/testsuite/gdb.base/tls-nothreads.exp6
-rw-r--r--gdb/testsuite/gdb.base/twice.exp3
-rw-r--r--gdb/testsuite/gdb.base/type-opaque.exp3
-rw-r--r--gdb/testsuite/gdb.base/unload.exp3
-rw-r--r--gdb/testsuite/gdb.base/varargs.exp3
-rw-r--r--gdb/testsuite/gdb.base/watch_thread_num.exp3
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-hw-attach.exp3
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-running.exp3
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-solib.exp3
-rw-r--r--gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp3
-rw-r--r--gdb/testsuite/gdb.base/watchpoints.exp3
-rw-r--r--gdb/testsuite/gdb.base/with-mf.exp3
-rw-r--r--gdb/testsuite/gdb.base/with.exp9
192 files changed, 500 insertions, 250 deletions
diff --git a/gdb/testsuite/gdb.base/access-mem-running.exp b/gdb/testsuite/gdb.base/access-mem-running.exp
index ecff427..280e89b 100644
--- a/gdb/testsuite/gdb.base/access-mem-running.exp
+++ b/gdb/testsuite/gdb.base/access-mem-running.exp
@@ -32,7 +32,8 @@ proc test { non_stop } {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop $non_stop\""
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
}
if ![runto_main] {
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 06dbec2..744d825 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -533,7 +533,8 @@ proc thread_test {} {
if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp
index 7b62a75..36bfee2 100644
--- a/gdb/testsuite/gdb.base/args.exp
+++ b/gdb/testsuite/gdb.base/args.exp
@@ -51,7 +51,8 @@ proc args_test { name arglist {re_list {}} } {
save_vars { ::GDBFLAGS } {
set ::GDBFLAGS "$::GDBFLAGS --args $::binfile $arglist"
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_test_no_output "set startup-with-shell ${startup_with_shell}" \
"set startup-with-shell for $name"
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
index 4fc221f..757ce92 100644
--- a/gdb/testsuite/gdb.base/arrayidx.exp
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
@@ -24,7 +24,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/assign.exp b/gdb/testsuite/gdb.base/assign.exp
index a69655d..aaee796 100644
--- a/gdb/testsuite/gdb.base/assign.exp
+++ b/gdb/testsuite/gdb.base/assign.exp
@@ -33,7 +33,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
diff --git a/gdb/testsuite/gdb.base/attach-fail-twice.exp b/gdb/testsuite/gdb.base/attach-fail-twice.exp
index 529002d..5e5d73f 100644
--- a/gdb/testsuite/gdb.base/attach-fail-twice.exp
+++ b/gdb/testsuite/gdb.base/attach-fail-twice.exp
@@ -77,7 +77,8 @@ proc test_good_attach {test} {
}
proc_with_prefix test {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
# GDB used to have a bug on Windows where failing to attach once
# made a subsequent "attach" or "run" hang. So it's important for
diff --git a/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp b/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
index 2ce092d..c43a11c 100644
--- a/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
+++ b/gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
@@ -36,7 +36,8 @@ proc do_test {} {
# Attach to the parent, run it to a known point, extract the
# child's PID, and detach.
with_test_prefix "parent" {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test "attach $parent_pid" \
"Attaching to program.*, process $parent_pid.*" \
@@ -56,7 +57,8 @@ proc do_test {} {
# Start over, and attach to the child this time.
with_test_prefix "child" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "attach $child_pid" \
"Attaching to program.*, process $child_pid.*" \
diff --git a/gdb/testsuite/gdb.base/attach-wait-input.exp b/gdb/testsuite/gdb.base/attach-wait-input.exp
index 84c9bab..47e3d25 100644
--- a/gdb/testsuite/gdb.base/attach-wait-input.exp
+++ b/gdb/testsuite/gdb.base/attach-wait-input.exp
@@ -43,7 +43,8 @@ proc start_program {binfile} {
global gdb_prompt
global decimal
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto setup_done]} {
return 0
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 0d1550a..d0a29f2 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -56,7 +56,8 @@ proc_with_prefix do_attach_failure_tests {} {
global escapedbinfile
global srcfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Figure out a regular expression that will match the sysroot,
# noting that the default sysroot is "target:", and also noting
@@ -215,7 +216,8 @@ proc_with_prefix do_attach_tests {} {
global timeout
global decimal
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Figure out a regular expression that will match the sysroot,
# noting that the default sysroot is "target:", and also noting
@@ -519,7 +521,8 @@ proc_with_prefix do_attach_exec_mismatch_handling_tests {} {
global binfile2
global binfile3
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Start two programs that can be attached to.
# The first program contains a 'int bidule' variable, the second a 'float bidule'.
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 090d9ba..38efa45 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -41,7 +41,8 @@ set core_works [expr [isnative] && ! [is_remote target]]
# Run GDB on the test program up to where it will dump core.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.base/basic-edit-cmd.exp b/gdb/testsuite/gdb.base/basic-edit-cmd.exp
index 8a23c9b..7ad8ab9 100644
--- a/gdb/testsuite/gdb.base/basic-edit-cmd.exp
+++ b/gdb/testsuite/gdb.base/basic-edit-cmd.exp
@@ -68,7 +68,8 @@ save_vars { env(EDITOR) } {
"try edit when no symbol file is loaded"
# Now start with a test binary.
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
with_test_prefix "before starting inferior" {
diff --git a/gdb/testsuite/gdb.base/bfp-test.exp b/gdb/testsuite/gdb.base/bfp-test.exp
index 7781fe1..53d274f 100644
--- a/gdb/testsuite/gdb.base/bfp-test.exp
+++ b/gdb/testsuite/gdb.base/bfp-test.exp
@@ -23,7 +23,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp b/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp
index 18e20e0..2e2a8e6 100644
--- a/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp
+++ b/gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp
@@ -34,7 +34,8 @@ if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
# AFTER_KILL_COND is appended to the breakpoint condition, after "kill
# -SIGINT $gdb_pid".
proc test { {after_kill_cond ""} } {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/bg-execution-repeat.exp b/gdb/testsuite/gdb.base/bg-execution-repeat.exp
index d5580fb..e7bdf49 100644
--- a/gdb/testsuite/gdb.base/bg-execution-repeat.exp
+++ b/gdb/testsuite/gdb.base/bg-execution-repeat.exp
@@ -33,7 +33,8 @@ proc test {continue_cmd} {
global binfile
global linenum
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 7727e48..f917eb8 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -117,7 +117,8 @@ proc test {dumper} {
# Run GDB on the bigcore program up-to where it will dump core.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp
index a99660a..3e981dd 100644
--- a/gdb/testsuite/gdb.base/bitfields2.exp
+++ b/gdb/testsuite/gdb.base/bitfields2.exp
@@ -233,7 +233,8 @@ proc bitfield_set {} {
}
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
runto_main
diff --git a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
index 4fc8f06..648992c 100644
--- a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
@@ -118,7 +118,8 @@ proc do_test {} {
# "attach".
with_test_prefix "run" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return -1
@@ -129,7 +130,8 @@ with_test_prefix "run" {
with_test_prefix "attach" {
if {[can_spawn_for_attach]} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/gdb.base/bp-cond-failure.exp
index 4d03e7b..5388522 100644
--- a/gdb/testsuite/gdb.base/bp-cond-failure.exp
+++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp
@@ -45,7 +45,8 @@ if { [is_address_zero_readable] } {
}
proc run_test { cond_eval access_type bpexpr nloc } {
- clean_restart ${::binfile}
+ clean_restart
+ gdb_load $::binfile
if { ![runto_main] } {
return -1
diff --git a/gdb/testsuite/gdb.base/bp-disabled-by-cond.exp b/gdb/testsuite/gdb.base/bp-disabled-by-cond.exp
index f0bdd16..371b9e7 100644
--- a/gdb/testsuite/gdb.base/bp-disabled-by-cond.exp
+++ b/gdb/testsuite/gdb.base/bp-disabled-by-cond.exp
@@ -52,7 +52,8 @@ set exit_bp_line [gdb_get_line_number "BP before exit" $srcfile]
# Restart the inferior, which should unload the shared library, GDB
# should mark the b/p as disabled due to its condition again.
proc run_test { hit_cond } {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index c6c6269..3ae5efe 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -42,7 +42,8 @@ proc test {always_inserted sw_watchpoint} {
global gdb_prompt
global srcfile binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
index 06402dc..63428a1 100644
--- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
+++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
@@ -61,7 +61,8 @@ foreach test_data {{SEGV "Segmentation fault"} \
# Restart GDB.
save_vars { GDB } {
set GDB [gdb_no_core]
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
}
# Capture the pid of GDB.
diff --git a/gdb/testsuite/gdb.base/bt-selected-frame.exp b/gdb/testsuite/gdb.base/bt-selected-frame.exp
index 68f5ed4..bbe2a5a 100644
--- a/gdb/testsuite/gdb.base/bt-selected-frame.exp
+++ b/gdb/testsuite/gdb.base/bt-selected-frame.exp
@@ -24,7 +24,8 @@ if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
proc check_selected_frame_after_bt { bt_cmd stack_pattern } {
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
with_test_prefix $bt_cmd {
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 244eba8..511e209 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -39,7 +39,8 @@ set allow_float_test [allow_float_test]
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.base/call-signal-resume.exp b/gdb/testsuite/gdb.base/call-signal-resume.exp
index 10a2928..a74b8af 100644
--- a/gdb/testsuite/gdb.base/call-signal-resume.exp
+++ b/gdb/testsuite/gdb.base/call-signal-resume.exp
@@ -47,7 +47,8 @@ proc get_dummy_frame_number { } {
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.base/callexit.exp b/gdb/testsuite/gdb.base/callexit.exp
index c250c67..e0ce899 100644
--- a/gdb/testsuite/gdb.base/callexit.exp
+++ b/gdb/testsuite/gdb.base/callexit.exp
@@ -27,7 +27,8 @@ require {!target_info exists gdb,cannot_call_functions}
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if { ![runto_main] } {
return 0
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index f3ddef5..9c5839c 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -630,7 +630,8 @@ proc test_catch_syscall_multi_arch {} {
test_catch_syscall_multi_arch_1 $arch1 $arch2 $syscall1_name \
$syscall2_name $syscall_number
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
}
proc do_syscall_tests_without_xml {} {
@@ -801,18 +802,21 @@ fill_all_syscalls_numbers
# Execute the tests, using XML support
gdb_exit
if { [allow_xml_test] } {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
do_syscall_tests
# Now, we have to see if GDB displays a warning when we
# don't set the data-directory but try to use catch syscall
# anyway. For that, we must restart GDB first.
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
test_catch_syscall_fail_nodatadir
}
# Restart gdb
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Execute the tests, without XML support. In this case, GDB will
# only display syscall numbers, and not syscall names.
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index 89b36f5..55eba5d 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -290,7 +290,8 @@ gdb_test "restart 10" "has no checkpoints" "no more checkpoint 10"
# Now let's try setting a large number of checkpoints (>600)
#
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
runto_main
gdb_breakpoint $break1_loc
@@ -356,7 +357,8 @@ gdb_test "kill" "" "kill all one with many checkpoints" \
#
with_test_prefix "delete checkpoint 0" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
runto_main
gdb_test "checkpoint" "Checkpoint 1: fork returned pid $decimal\\."
diff --git a/gdb/testsuite/gdb.base/chng-syms.exp b/gdb/testsuite/gdb.base/chng-syms.exp
index a561689..dbc523d 100644
--- a/gdb/testsuite/gdb.base/chng-syms.exp
+++ b/gdb/testsuite/gdb.base/chng-syms.exp
@@ -36,7 +36,8 @@ proc expect_to_stop_here { ident } {
gdb_test "" "Breakpoint \[0-9\]*, stop_here .*" "running to stop_here $ident"
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test "break stop_here if (var1 == 42)" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
diff --git a/gdb/testsuite/gdb.base/clear_non_user_bp.exp b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
index f078b97..c016d07 100644
--- a/gdb/testsuite/gdb.base/clear_non_user_bp.exp
+++ b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
@@ -47,7 +47,8 @@ if { [gdb_compile "${srcdir}/${subdir}/main.c" "${binfile}" executable {debug}]
}
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/code-expr.exp b/gdb/testsuite/gdb.base/code-expr.exp
index 4288617..8af2ee6 100644
--- a/gdb/testsuite/gdb.base/code-expr.exp
+++ b/gdb/testsuite/gdb.base/code-expr.exp
@@ -29,7 +29,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
diff --git a/gdb/testsuite/gdb.base/cond-expr.exp b/gdb/testsuite/gdb.base/cond-expr.exp
index e60fd16..2080937 100644
--- a/gdb/testsuite/gdb.base/cond-expr.exp
+++ b/gdb/testsuite/gdb.base/cond-expr.exp
@@ -39,7 +39,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/condbreak-multi-context.exp b/gdb/testsuite/gdb.base/condbreak-multi-context.exp
index dce162b..b4ea0f1 100644
--- a/gdb/testsuite/gdb.base/condbreak-multi-context.exp
+++ b/gdb/testsuite/gdb.base/condbreak-multi-context.exp
@@ -53,7 +53,8 @@ proc find_location_contexts { } {
global loc_name loc_index fill
global decimal hex gdb_prompt binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return
@@ -130,7 +131,8 @@ proc check_bp_locations {bpnum states cond {msg ""}} {
proc_with_prefix scenario_1 { start_before } {
global warning decimal fill bkptno_num_re binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if { $start_before } {
if {![runto_main temporary]} {
@@ -242,7 +244,8 @@ proc setup_bps { bpnum1_name bpnum2_name } {
proc_with_prefix scenario_2 { start_before } {
global binfile bkptno_num_re
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if { $start_before } {
if {![runto_main temporary]} {
@@ -290,7 +293,8 @@ proc_with_prefix scenario_2 { start_before } {
proc_with_prefix scenario_3 { start_before } {
global binfile bkptno_num_re loc_index warning
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if { $start_before } {
if {![runto_main temporary]} {
@@ -367,7 +371,8 @@ proc_with_prefix scenario_3 { start_before } {
proc_with_prefix scenario_4 { start_before } {
global binfile bkptno_num_re loc_index warning
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if { $start_before } {
if {![runto_main temporary]} {
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 8f55945..dcc8d1b 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -34,7 +34,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
diff --git a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
index 4764d72..8ba1f61 100644
--- a/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
+++ b/gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
@@ -45,7 +45,8 @@ proc do_test {displaced breakpoint_always_inserted} {
global gdb_prompt decimal
global srcfile binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set displaced-stepping $displaced"
gdb_test_no_output "set breakpoint always-inserted $breakpoint_always_inserted"
diff --git a/gdb/testsuite/gdb.base/corefile-exec-context.exp b/gdb/testsuite/gdb.base/corefile-exec-context.exp
index 7c9647c..23fd964 100644
--- a/gdb/testsuite/gdb.base/corefile-exec-context.exp
+++ b/gdb/testsuite/gdb.base/corefile-exec-context.exp
@@ -51,7 +51,8 @@ remote_exec build "mv $corefile $corefile_1"
# Load the core file and confirm that the full executable name is
# seen.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set saw_generated_line false
gdb_test_multiple "core-file $corefile_1" "load core file no args" {
-re "^Core was generated by `[string_to_regexp $binfile]'\\.\r\n" {
@@ -80,7 +81,8 @@ remote_exec build "mv $corefile $corefile_2"
# Load the core file and confirm that the full executable name and
# argument list are seen.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set saw_generated_line false
gdb_test_multiple "core-file $corefile_2" "load core file with args" {
-re "^Core was generated by `[string_to_regexp $binfile] $args'\\.\r\n" {
@@ -155,7 +157,8 @@ remote_exec build "mv $corefile $corefile_3"
# Restart, load the core file, and check the environment variable
# shows up.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Check for environment variable VAR_NAME in the environment, its
# value should be VAR_VALUE.
diff --git a/gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp b/gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp
index 57c665e..94ab454 100644
--- a/gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp
+++ b/gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp
@@ -93,7 +93,8 @@ save_vars { env(LD_PRELOAD) env(ASAN_OPTIONS) } {
# LD_PRELOAD.
append_environment_default ASAN_OPTIONS verify_asan_link_order 0
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Start GDB with the modified environment, this means that, when
# using remote targets, gdbserver will also use the preload
@@ -186,7 +187,8 @@ with_timeout_factor 3 {
# Restart GDB. This time we are _not_ using the preload library. We
# no longer need it as we are only analysing the core file now.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Load the core file.
gdb_test "core-file $corefile" \
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index fd8d1d1..c34dfb5 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -97,7 +97,8 @@ foreach_with_prefix coreopt {--core= -core= "-c "} {
# Now restart normally.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Test basic corefile recognition via core-file command.
@@ -201,7 +202,8 @@ set coremmap_data_backup_filename \
remote_exec host "mv ${coremmap_data_filename} \
${coremmap_data_backup_filename}"
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Load the core file and check we get a warning about the
# coremmap.data file being missing.
@@ -230,7 +232,8 @@ remote_exec host "mv ${coremmap_data_backup_filename} \
# Test that we can unload the core with the "detach" command.
proc_with_prefix corefile_detach {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_test "core-file $::corefile" "Core was generated by .*" "load core"
gdb_test "detach" "No core file now\\." "detach core"
@@ -252,7 +255,8 @@ proc corefile_test_run {} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_test "core-file $corefile" "Core was generated by .*" "run: load core again"
set re "Local core dump file:"
diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp
index d35ba1a..3975460 100644
--- a/gdb/testsuite/gdb.base/corefile2.exp
+++ b/gdb/testsuite/gdb.base/corefile2.exp
@@ -171,7 +171,8 @@ with_test_prefix "renamed binfile" {
# Restart and run to the abort call.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
@@ -195,7 +196,8 @@ if {!$core_supported} {
gdb_test_no_output "maint print core-file-backed-mappings" \
"maint print core-file-backed-mapping with no core file"
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set core_loaded [gdb_core_cmd "$corefile" "re-load generated corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/corefile3.exp b/gdb/testsuite/gdb.base/corefile3.exp
index ef391d1..4528509 100644
--- a/gdb/testsuite/gdb.base/corefile3.exp
+++ b/gdb/testsuite/gdb.base/corefile3.exp
@@ -47,7 +47,8 @@ set backup_filename \
[standard_output_file coredir.[getpid]/coremmap.data.backup]
remote_exec host "mv ${data_filename} ${backup_filename}"
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Load the core file. The 'coremap.data' file cannot be found by GDB,
# but all the mappings for that file are r/w and should be present in
diff --git a/gdb/testsuite/gdb.base/default-args.exp b/gdb/testsuite/gdb.base/default-args.exp
index efc4205..ae417ed 100644
--- a/gdb/testsuite/gdb.base/default-args.exp
+++ b/gdb/testsuite/gdb.base/default-args.exp
@@ -25,7 +25,8 @@ if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Basic/core tests using user-visible commands.
with_test_prefix "basics" {
diff --git a/gdb/testsuite/gdb.base/detach-while-running.exp b/gdb/testsuite/gdb.base/detach-while-running.exp
index 60943f3..34c2adc 100644
--- a/gdb/testsuite/gdb.base/detach-while-running.exp
+++ b/gdb/testsuite/gdb.base/detach-while-running.exp
@@ -45,7 +45,8 @@ proc test {} {
if {$is_remote} {
append ::GDBFLAGS " -ex \"maint set target-non-stop on\""
}
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
}
set test_spawn_id [spawn_wait_for_attach $binfile]
diff --git a/gdb/testsuite/gdb.base/detach.exp b/gdb/testsuite/gdb.base/detach.exp
index f9f67a8..c8d4350 100644
--- a/gdb/testsuite/gdb.base/detach.exp
+++ b/gdb/testsuite/gdb.base/detach.exp
@@ -42,7 +42,8 @@ proc do_detach_tests {} {
gdb_test "detach" "Detaching from program: .*$escapedbinfile, .*" "detach, $pass"
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
global pass
set pass "one"
diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index 2a6c377..11f75da 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -28,7 +28,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index 7aed6d5..2fb6e07 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -52,7 +52,8 @@ if !$use_gdb_stub {
gdb_test "kill" ".*" "kill again"
gdb_test "detach" ".*" "detach again"
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
}
# Ok, on to real life
diff --git a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp
index bfce900..f3bdfb0 100644
--- a/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp
+++ b/gdb/testsuite/gdb.base/dlmopen-ns-ids.exp
@@ -126,7 +126,8 @@ proc get_first_so_ns {} {
# Run the tests relating to the command "info sharedlibrary", to
# verify that the namespace ID is consistent.
proc test_info_shared {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if { ![runto_main] } {
return
@@ -176,7 +177,8 @@ proc test_info_shared {} {
# Also tests that the namespace ID is only printed at the correct
# times.
proc_with_prefix test_conv_vars {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_test "print \$_linker_namespace_count" "0" \
"0 namespace before starting inferior"
@@ -219,7 +221,8 @@ proc_with_prefix test_conv_vars {} {
# Restarting GDB so that we can test setting a breakpoint
# using the convenience variable, while a proper bp syntax
# isn't implemented for namespaces
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
}
@@ -235,7 +238,8 @@ proc_with_prefix test_conv_vars {} {
# Run several tests relating to the command "info namespaces".
proc test_info_linker_namespaces {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
# Check that "info linker-namespaces" while the inferior is not running
# doesn't crash.
diff --git a/gdb/testsuite/gdb.base/dlmopen.exp b/gdb/testsuite/gdb.base/dlmopen.exp
index 54fb4c4..c4eb7cd 100644
--- a/gdb/testsuite/gdb.base/dlmopen.exp
+++ b/gdb/testsuite/gdb.base/dlmopen.exp
@@ -183,7 +183,8 @@ proc test_dlmopen {} {
# Setup for calling 'test_dlmopen', this is the version of the test
# that doesn't use 'attach'.
proc test_dlmopen_no_attach {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if { ![runto_main] } {
return
@@ -208,7 +209,8 @@ proc test_dlmopen_with_attach {} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
# Start the test program.
set test_spawn_id [spawn_wait_for_attach $::binfile]
@@ -298,7 +300,8 @@ proc_with_prefix test_solib_unmap_events { } {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if { ![runto_main] } {
return
@@ -393,7 +396,8 @@ proc_with_prefix test_solib_unmap_events { } {
# Check that we can 'next' over the dlclose calls without GDB giving any
# warnings or errors.
proc_with_prefix test_next_over_dlclose {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if { ![runto_main] } {
return
diff --git a/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp b/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
index 649784b..11a8310 100644
--- a/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
+++ b/gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
@@ -28,7 +28,8 @@ proc test { style } {
global gdb_prompt binfile dp_location
with_test_prefix "$style" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return -1
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index dc3384b..431037c 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -37,7 +37,8 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected
with_test_prefix "$test_prefix" {
# Start with a clean gdb
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set breakpoint always-inserted ${breakpoint_always_inserted}"
gdb_test_no_output "set dprintf-style ${dprintf_style}"
@@ -68,7 +69,8 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected
gdb_exit
# Check that the process still exists by attaching a new gdb to it.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
set test "re-attach to inferior"
set is_gdbserver [target_is_gdbserver]
diff --git a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
index 06be468..65de2d5 100644
--- a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
@@ -93,7 +93,8 @@ do_test "" $test
# Restart GDB and 'source' the script; this will (still) run the program
# due to the 'run' command in the script.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
do_test "source $x_file" "load and run script using source command"
# This should leave us at the gdb prompt; Run program again using
diff --git a/gdb/testsuite/gdb.base/dprintf-pending.exp b/gdb/testsuite/gdb.base/dprintf-pending.exp
index 9242a84..f28e969 100644
--- a/gdb/testsuite/gdb.base/dprintf-pending.exp
+++ b/gdb/testsuite/gdb.base/dprintf-pending.exp
@@ -60,7 +60,8 @@ with_test_prefix "without symbols" {
gdb_test "" ".*x=3.*x=4.*x=3.*" "run to resolved dprintf"
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib_sl
#
diff --git a/gdb/testsuite/gdb.base/dprintf.exp b/gdb/testsuite/gdb.base/dprintf.exp
index 0135b86..262ccc1 100644
--- a/gdb/testsuite/gdb.base/dprintf.exp
+++ b/gdb/testsuite/gdb.base/dprintf.exp
@@ -74,7 +74,8 @@ proc restart {} {
global binfile
global bp_location1 dp_location1
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return -1
diff --git a/gdb/testsuite/gdb.base/dso2dso.exp b/gdb/testsuite/gdb.base/dso2dso.exp
index 24d4203..3b00f6d 100644
--- a/gdb/testsuite/gdb.base/dso2dso.exp
+++ b/gdb/testsuite/gdb.base/dso2dso.exp
@@ -54,7 +54,8 @@ if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable \
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $binfile_libdso2
gdb_load_shlib $binfile_libdso1
diff --git a/gdb/testsuite/gdb.base/dtrace-probe.exp b/gdb/testsuite/gdb.base/dtrace-probe.exp
index 32a72cc..e165bb4 100644
--- a/gdb/testsuite/gdb.base/dtrace-probe.exp
+++ b/gdb/testsuite/gdb.base/dtrace-probe.exp
@@ -27,7 +27,8 @@ proc dtrace_test {} {
return -1
}
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return -1
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 7c84056..64d897b 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -46,7 +46,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${op
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_test "dump mem /dev/null 0x10 0x20" "Cannot access memory at address 0x10" \
"inaccessible memory is reported"
diff --git a/gdb/testsuite/gdb.base/duplicate-bp.exp b/gdb/testsuite/gdb.base/duplicate-bp.exp
index b1003f2..da5834b 100644
--- a/gdb/testsuite/gdb.base/duplicate-bp.exp
+++ b/gdb/testsuite/gdb.base/duplicate-bp.exp
@@ -24,7 +24,8 @@ proc test_setup { count } {
global srcfile
global binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/eh_return.exp b/gdb/testsuite/gdb.base/eh_return.exp
index 5a4f524..703f9e9 100644
--- a/gdb/testsuite/gdb.base/eh_return.exp
+++ b/gdb/testsuite/gdb.base/eh_return.exp
@@ -71,7 +71,8 @@ if { $address == -1 } {
return 0
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_assert [gdb_breakpoint "*$address" no-message] "set breakpoint on address"
diff --git a/gdb/testsuite/gdb.base/errno.exp b/gdb/testsuite/gdb.base/errno.exp
index ff18214..ea1ff70 100644
--- a/gdb/testsuite/gdb.base/errno.exp
+++ b/gdb/testsuite/gdb.base/errno.exp
@@ -45,7 +45,8 @@
standard_testfile
proc do_tests {{do_xfail_cast 0} {do_xfail 0} {do_xfail_core_test 0}} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if ![runto_main] {
return
}
@@ -176,7 +177,8 @@ proc do_tests {{do_xfail_cast 0} {do_xfail 0} {do_xfail_core_test 0}} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
set core_loaded [gdb_core_cmd $corefile "load corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/eval-skip.exp b/gdb/testsuite/gdb.base/eval-skip.exp
index 82c5fe0..b4c856e 100644
--- a/gdb/testsuite/gdb.base/eval-skip.exp
+++ b/gdb/testsuite/gdb.base/eval-skip.exp
@@ -39,7 +39,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/exe-lock.exp b/gdb/testsuite/gdb.base/exe-lock.exp
index 40a470f..2e375b4 100644
--- a/gdb/testsuite/gdb.base/exe-lock.exp
+++ b/gdb/testsuite/gdb.base/exe-lock.exp
@@ -27,7 +27,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Sanity-check: Verify that the executable exists. This is just to
# make sure that, when we verify later that the file does not exist,
diff --git a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
index 7ab446e..99f5e7d 100644
--- a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
+++ b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
@@ -69,5 +69,6 @@ proc do_exec_sysroot_test {} {
}
# Start with a fresh gdb
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
do_exec_sysroot_test
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 81f6f19..ee0c198 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -26,7 +26,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
# set it up at a breakpoint so we can play with the variable values
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index 7347c11..a6b4c23 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -41,7 +41,8 @@ system "rm -rf [standard_output_file *.fileio.test]"
set oldtimeout $timeout
set timeout [expr "$timeout + 60"]
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.base/find.exp b/gdb/testsuite/gdb.base/find.exp
index ae68686..3b2dfb0 100644
--- a/gdb/testsuite/gdb.base/find.exp
+++ b/gdb/testsuite/gdb.base/find.exp
@@ -22,7 +22,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test "break $srcfile:stop_here" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
diff --git a/gdb/testsuite/gdb.base/fixsection.exp b/gdb/testsuite/gdb.base/fixsection.exp
index 9a5c996..3056851 100644
--- a/gdb/testsuite/gdb.base/fixsection.exp
+++ b/gdb/testsuite/gdb.base/fixsection.exp
@@ -32,7 +32,8 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib ${lib_sl}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp
index 95b83af..b8d3a6c 100644
--- a/gdb/testsuite/gdb.base/float128.exp
+++ b/gdb/testsuite/gdb.base/float128.exp
@@ -30,7 +30,8 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/floatn.exp b/gdb/testsuite/gdb.base/floatn.exp
index 7138d04..1b39ed8 100644
--- a/gdb/testsuite/gdb.base/floatn.exp
+++ b/gdb/testsuite/gdb.base/floatn.exp
@@ -30,7 +30,8 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
index 2d47d5d..cb49ef6 100644
--- a/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
+++ b/gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
@@ -41,7 +41,8 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile} $opts] } {
}
proc do_test {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_locate_shlib $::shlib_path
gdb_test_no_output "set follow-fork-mode child"
gdb_test_no_output "set detach-on-fork off"
diff --git a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
index 19ace00..c24a9bc 100644
--- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
+++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp
@@ -73,7 +73,8 @@ set i 0
foreach_with_prefix print_inferior_events { "on" "off" } {
foreach_with_prefix follow_fork_mode { "child" "parent" } {
foreach_with_prefix detach_on_fork { "on" "off" } {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set print inferior-events $print_inferior_events"
gdb_test_no_output "set follow-fork-mode $follow_fork_mode"
gdb_test_no_output "set detach-on-fork $detach_on_fork"
diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp
index 31e4d15..0daa3aa 100644
--- a/gdb/testsuite/gdb.base/frame-args.exp
+++ b/gdb/testsuite/gdb.base/frame-args.exp
@@ -19,7 +19,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto break_me]} {
return
diff --git a/gdb/testsuite/gdb.base/frame-info-consistent.exp b/gdb/testsuite/gdb.base/frame-info-consistent.exp
index 67bcd18..b594047 100644
--- a/gdb/testsuite/gdb.base/frame-info-consistent.exp
+++ b/gdb/testsuite/gdb.base/frame-info-consistent.exp
@@ -97,7 +97,8 @@ proc compare_frames {frames} {
proc test {enable} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_test_no_output "maint frame-unwinder $enable DEBUGINFO"
diff --git a/gdb/testsuite/gdb.base/frame-view.exp b/gdb/testsuite/gdb.base/frame-view.exp
index fa00c35..34ac668 100644
--- a/gdb/testsuite/gdb.base/frame-view.exp
+++ b/gdb/testsuite/gdb.base/frame-view.exp
@@ -28,7 +28,8 @@ if { [build_executable "failed to prepare" \
# "select-frame view".
proc test_select_frame_view { with_pretty_printer } {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if { $with_pretty_printer } {
require allow_python_tests
diff --git a/gdb/testsuite/gdb.base/fullname.exp b/gdb/testsuite/gdb.base/fullname.exp
index ce617d5..ec90179 100644
--- a/gdb/testsuite/gdb.base/fullname.exp
+++ b/gdb/testsuite/gdb.base/fullname.exp
@@ -45,7 +45,8 @@ set line [gdb_get_line_number "set breakpoint 1 here"]
# Initialize GDB after getting the line number, to make sure
# symbols aren't loaded.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set msg "set breakpoint by full path before loading symbols - built absolute"
if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
@@ -70,7 +71,8 @@ if { [gdb_compile [relative_filename [pwd] [build_standard_output_file tmp-${sr
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set msg "set breakpoint by full path before loading symbols - built relative"
if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
@@ -99,7 +101,8 @@ with_cwd [standard_output_file {}] {
}
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set msg "set breakpoint by full path before loading symbols - built other"
if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}] != 0 } {
diff --git a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
index 0fb79c7..5a6bfe6 100644
--- a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
+++ b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
@@ -29,7 +29,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set args ${pattern}" \
"set buffer exceeding arguments"
diff --git a/gdb/testsuite/gdb.base/gcore-relro-pie.exp b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
index 361fdb6..1f27a0b 100644
--- a/gdb/testsuite/gdb.base/gcore-relro-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
@@ -51,7 +51,8 @@ if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
# Now restart gdb with the unstripped binary and load the corefile.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test "core ${gcorefile}" \
"Core was generated by .*" "re-load generated corefile"
diff --git a/gdb/testsuite/gdb.base/gcore-relro.exp b/gdb/testsuite/gdb.base/gcore-relro.exp
index 0090c37..2bbd064 100644
--- a/gdb/testsuite/gdb.base/gcore-relro.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro.exp
@@ -34,7 +34,8 @@ set objfile [standard_output_file ${testfile}.o]
}
with_test_prefix "first session" {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_load_shlib ${binfile_lib}
if ![runto lib] {
@@ -49,7 +50,8 @@ with_test_prefix "first session" {
# Now restart gdb and load the corefile.
with_test_prefix "second session" {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_load_shlib ${binfile_lib}
gdb_test "core ${gcorefile}" "Core was generated by .*" \
diff --git a/gdb/testsuite/gdb.base/gcore-tls-pie.exp b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
index c508b78..1ad9b55 100644
--- a/gdb/testsuite/gdb.base/gcore-tls-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
@@ -55,7 +55,8 @@ if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
# Now restart gdb with the unstripped binary and load the corefile.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test "core ${gcorefile}" \
"Core was generated by .*" "re-load generated corefile"
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 0a9f099..c8a4c11 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -58,7 +58,8 @@ if {!$core_supported} {
}
# Now restart gdb and load the corefile.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set core_loaded [gdb_core_cmd "$corefile" "re-load generated corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/gdb1250.exp b/gdb/testsuite/gdb.base/gdb1250.exp
index 4e83c8c..2cabbf0 100644
--- a/gdb/testsuite/gdb.base/gdb1250.exp
+++ b/gdb/testsuite/gdb.base/gdb1250.exp
@@ -29,7 +29,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto abort {allow-pending}]} {
return
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index 648abd7..ab12a28 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -34,7 +34,8 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib $libobj
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/gdbindex-stabs.exp b/gdb/testsuite/gdb.base/gdbindex-stabs.exp
index 506ad11..9becaa1 100644
--- a/gdb/testsuite/gdb.base/gdbindex-stabs.exp
+++ b/gdb/testsuite/gdb.base/gdbindex-stabs.exp
@@ -28,7 +28,8 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile_stabs}" ${objfile_stabs} object
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# FAIL was: No line number known for stabs_function.
gdb_test "list stabs_function" " marker-here .*"
diff --git a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
index 92d6c62..480396a 100644
--- a/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
+++ b/gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
@@ -42,7 +42,8 @@ if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable \
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $binfile_lib1
gdb_load_shlib $binfile_lib2
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp
index ac0bff3..62c2003 100644
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
@@ -40,7 +40,8 @@ if { [do_compile {-mcpu=native}] != ""
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if { ![runto_main] } {
return -1
diff --git a/gdb/testsuite/gdb.base/hashline1.exp b/gdb/testsuite/gdb.base/hashline1.exp
index 9af144b..8e815ae 100644
--- a/gdb/testsuite/gdb.base/hashline1.exp
+++ b/gdb/testsuite/gdb.base/hashline1.exp
@@ -37,7 +37,8 @@ if { [gdb_compile $compile_name "${binfile}" executable {debug}] != "" } {
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
set bp_location [gdb_get_line_number "set breakpoint here" $new_srcfile]
diff --git a/gdb/testsuite/gdb.base/hashline2.exp b/gdb/testsuite/gdb.base/hashline2.exp
index 740f511..f12b4d1 100644
--- a/gdb/testsuite/gdb.base/hashline2.exp
+++ b/gdb/testsuite/gdb.base/hashline2.exp
@@ -34,7 +34,8 @@ if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set bp_location [gdb_get_line_number "set breakpoint here" ${new_srcfile}]
diff --git a/gdb/testsuite/gdb.base/hashline3.exp b/gdb/testsuite/gdb.base/hashline3.exp
index 2575c28..508f7c9 100644
--- a/gdb/testsuite/gdb.base/hashline3.exp
+++ b/gdb/testsuite/gdb.base/hashline3.exp
@@ -35,7 +35,8 @@ if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set bp_location [gdb_get_line_number "set breakpoint here" $new_srcfile]
diff --git a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
index 8598345..9355ce0 100644
--- a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
+++ b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
@@ -34,7 +34,8 @@ if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib_src} ${lib_so} $lib_opts] != "
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib_so
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/hook-stop.exp b/gdb/testsuite/gdb.base/hook-stop.exp
index a7b6ccd..1c774ce 100644
--- a/gdb/testsuite/gdb.base/hook-stop.exp
+++ b/gdb/testsuite/gdb.base/hook-stop.exp
@@ -37,7 +37,8 @@ proc define_hook_stop {commands} {
proc setup {commands} {
global srcfile binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return -code return
diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp
index f75b620..cb12964 100644
--- a/gdb/testsuite/gdb.base/huge.exp
+++ b/gdb/testsuite/gdb.base/huge.exp
@@ -42,7 +42,8 @@ for { set size $max } { $size >= $min } { set size [expr $size / 2] } {
require {expr $compilation_succeeded}
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
save_vars { timeout } {
set timeout 30
diff --git a/gdb/testsuite/gdb.base/infcall-exec.exp b/gdb/testsuite/gdb.base/infcall-exec.exp
index 33cc5b6..b819284 100644
--- a/gdb/testsuite/gdb.base/infcall-exec.exp
+++ b/gdb/testsuite/gdb.base/infcall-exec.exp
@@ -36,7 +36,8 @@ if { [is_remote target] } {
set binfile2 [gdb_remote_download target $binfile2]
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.base/infcall-failure.exp b/gdb/testsuite/gdb.base/infcall-failure.exp
index e7aeac1..594cb2b 100644
--- a/gdb/testsuite/gdb.base/infcall-failure.exp
+++ b/gdb/testsuite/gdb.base/infcall-failure.exp
@@ -39,7 +39,8 @@ 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
+ gdb_load $::binfile
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
index 3a11d7f..fae36c2 100644
--- a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
+++ b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
@@ -81,7 +81,8 @@ proc start_nested_structs_test { lang types } {
}
# Start with a fresh gdb.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
# Make certain that the output is consistent
gdb_test_no_output "set print sevenbit-strings"
diff --git a/gdb/testsuite/gdb.base/infcall-timeout.exp b/gdb/testsuite/gdb.base/infcall-timeout.exp
index aa7dbc3..621a7b9 100644
--- a/gdb/testsuite/gdb.base/infcall-timeout.exp
+++ b/gdb/testsuite/gdb.base/infcall-timeout.exp
@@ -41,7 +41,8 @@ proc run_test { target_async target_non_stop non_stop unwind } {
append ::GDBFLAGS \
" -ex \"maintenance set target-async ${target_async}\""
- clean_restart ${::binfile}
+ clean_restart
+ gdb_load $::binfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp
index dfa1215..3887239 100644
--- a/gdb/testsuite/gdb.base/inferior-args.exp
+++ b/gdb/testsuite/gdb.base/inferior-args.exp
@@ -43,7 +43,8 @@ proc do_test { method startup_with_shell inferior_args expected_results \
stub_suitable } {
global binfile hex
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set startup-with-shell $startup_with_shell"
diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp
index 764a88d..9ba3a4c 100644
--- a/gdb/testsuite/gdb.base/inferior-died.exp
+++ b/gdb/testsuite/gdb.base/inferior-died.exp
@@ -25,7 +25,8 @@ if { [build_executable "failed to build" ${testfile} ${testfile}.c] } {
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
}
gdb_test_no_output "set detach-on-fork off"
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index 8dff6a5..adc8894 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -63,7 +63,8 @@ if {[istarget "*-*-linux*"]} {
}
set gcorefile [standard_output_file $testfile.gcore]
if {[gdb_gcore_cmd $gcorefile "save a core file"]} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "core $gcorefile" "Core was generated by.*" \
"core [file tail $gcorefile]"
diff --git a/gdb/testsuite/gdb.base/info_sources_2.exp b/gdb/testsuite/gdb.base/info_sources_2.exp
index 39b594b..09e9972 100644
--- a/gdb/testsuite/gdb.base/info_sources_2.exp
+++ b/gdb/testsuite/gdb.base/info_sources_2.exp
@@ -35,7 +35,8 @@ if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable \
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
set solib_name [gdb_load_shlib $solib_name]
diff --git a/gdb/testsuite/gdb.base/internal-string-values.exp b/gdb/testsuite/gdb.base/internal-string-values.exp
index aa68bc9..c1afa18 100644
--- a/gdb/testsuite/gdb.base/internal-string-values.exp
+++ b/gdb/testsuite/gdb.base/internal-string-values.exp
@@ -250,7 +250,8 @@ proc_with_prefix test_internal_var { } {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
fail "could not run to main"
diff --git a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
index 3c46f5d..a42fc12 100644
--- a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
+++ b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
@@ -36,7 +36,8 @@ proc do_test {} {
# Attach to the parent, run it to a known point, extract the
# child's PID, and detach.
with_test_prefix "parent" {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test "attach $parent_pid" \
"Attaching to program.*, process $parent_pid.*" \
@@ -60,7 +61,8 @@ proc do_test {} {
with_test_prefix "child" {
global gdb_prompt
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "attach $child_pid" \
"Attaching to program.*, process $child_pid.*" \
diff --git a/gdb/testsuite/gdb.base/interrupt-daemon.exp b/gdb/testsuite/gdb.base/interrupt-daemon.exp
index 8b8c61d..b909437 100644
--- a/gdb/testsuite/gdb.base/interrupt-daemon.exp
+++ b/gdb/testsuite/gdb.base/interrupt-daemon.exp
@@ -30,7 +30,8 @@ proc do_test {} {
global binfile
global gdb_prompt
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "set follow-fork-mode child" ".*"
diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp
index ef6148b..e70f104 100644
--- a/gdb/testsuite/gdb.base/jit-reader-exec.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp
@@ -43,7 +43,8 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index 77705eb..55a274c 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -103,7 +103,8 @@ proc jit_test_reread {standalone change_addr} {
with_test_prefix "initial run" {
if {$standalone} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
} else {
clean_restart $binfile_dl
}
diff --git a/gdb/testsuite/gdb.base/kill-during-detach.exp b/gdb/testsuite/gdb.base/kill-during-detach.exp
index e164234..290606a 100644
--- a/gdb/testsuite/gdb.base/kill-during-detach.exp
+++ b/gdb/testsuite/gdb.base/kill-during-detach.exp
@@ -76,7 +76,8 @@ set checkpoint_line [gdb_get_line_number "Checkpoint here"]
proc run_test { exit_p checkpoint_p } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"set non-stop on\""
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/killed-outside.exp b/gdb/testsuite/gdb.base/killed-outside.exp
index 919584d..2b367e4 100644
--- a/gdb/testsuite/gdb.base/killed-outside.exp
+++ b/gdb/testsuite/gdb.base/killed-outside.exp
@@ -46,7 +46,8 @@ proc test {cmds_after_kill} {
global gdb_prompt
global decimal
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if ![runto done] {
return
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index b84b7d6..aa8d8e0 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -93,7 +93,8 @@ if {[runto csub]} {
gdb_continue_to_end "first session"
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Try exercising the "minimal" language a bit...
diff --git a/gdb/testsuite/gdb.base/lineinc.exp b/gdb/testsuite/gdb.base/lineinc.exp
index cfd2ba7..2382fa5 100644
--- a/gdb/testsuite/gdb.base/lineinc.exp
+++ b/gdb/testsuite/gdb.base/lineinc.exp
@@ -86,7 +86,8 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} executable \
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Any command that causes GDB to read the debugging info for the
# lineinc.c compilation unit will do here.
diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp
index 7807206..196a1f2 100644
--- a/gdb/testsuite/gdb.base/list-missing-source.exp
+++ b/gdb/testsuite/gdb.base/list-missing-source.exp
@@ -43,7 +43,8 @@ if { [gdb_compile "${srcfile}" "${binfile}" \
remote_file host delete $srcfile
# Now start GDB, run to main and try to list the source.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index d005ceb..bdbb52b 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -385,7 +385,8 @@ proc test_only_end {} {
proc test_list_invalid_args {} {
global binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test "list -INVALID" \
"invalid explicit location argument, \"-INVALID\"" \
"first use of \"list -INVALID\""
@@ -393,7 +394,8 @@ proc test_list_invalid_args {} {
"invalid explicit location argument, \"-INVALID\"" \
"second use of \"list -INVALID\""
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
"first use of \"list +INVALID\""
gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
@@ -499,7 +501,8 @@ proc test_list {command listsize1 listsize2 linerange1 linerange2} {
with_test_prefix "$command after stop: $listsize1, $listsize2" {
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return
}
diff --git a/gdb/testsuite/gdb.base/logical.exp b/gdb/testsuite/gdb.base/logical.exp
index 31007e8..b00d6d5 100644
--- a/gdb/testsuite/gdb.base/logical.exp
+++ b/gdb/testsuite/gdb.base/logical.exp
@@ -32,7 +32,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 38ba03e..4fbb757 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -30,7 +30,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
# use this to debug:
#log_user 1
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto known_types]} {
return
diff --git a/gdb/testsuite/gdb.base/longjmp.exp b/gdb/testsuite/gdb.base/longjmp.exp
index caf0d5c..99552e6 100644
--- a/gdb/testsuite/gdb.base/longjmp.exp
+++ b/gdb/testsuite/gdb.base/longjmp.exp
@@ -26,7 +26,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
proc do_test { with_probes } {
- clean_restart ${::binfile}
+ clean_restart
+ gdb_load $::binfile
if { !$with_probes } {
gdb_test "maint ignore-probes libc ^longjmp$"
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index 0b5f863..63f1356 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -29,7 +29,8 @@ if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Ask GDB to show the current definition of MACRO, and return a list
diff --git a/gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp b/gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp
index 80f2d01..91d0379 100644
--- a/gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp
+++ b/gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp
@@ -201,7 +201,8 @@ gdb_test "maint info blocks" [make_blocks_result normal_func \
inline_func_a inline_func_b] \
"maint info blocks using stored \$pc, inferior still running"
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Use the recorded $pc value to check inline frames when the inferior
# is not executing.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 7936e53..3d49b36 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -72,7 +72,8 @@ with_test_prefix "warnings" {
foreach cmd {"per-command" "per-command time"} {
with_test_prefix $cmd {
# GDB only warns once, so restart between commands.
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "mt set $cmd on" "$maybe_per_command_warning"
gdb_test "mt set $cmd off" "command started"
gdb_test_no_output "mt set $cmd on" \
diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/miscexprs.exp
index 86196fa..f723d75 100644
--- a/gdb/testsuite/gdb.base/miscexprs.exp
+++ b/gdb/testsuite/gdb.base/miscexprs.exp
@@ -44,7 +44,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [lis
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp
index 3facccb..5d2d220 100644
--- a/gdb/testsuite/gdb.base/multi-forks.exp
+++ b/gdb/testsuite/gdb.base/multi-forks.exp
@@ -28,7 +28,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $fla
# Start with a fresh gdb
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
global gdb_prompt
@@ -103,7 +104,8 @@ proc continue_to_exit_bp_loc {} {
# parent's branch.
foreach mode { "child" "parent" } {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
runto_main
gdb_test_no_output "set follow-fork $mode"
@@ -135,7 +137,8 @@ foreach mode { "child" "parent" } {
# Start with a fresh gdb
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
runto_main
gdb_breakpoint $exit_bp_loc
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 2d0a5a9..b839317 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -33,7 +33,8 @@ if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "
# Start with a fresh gdb.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Run to FUNC and unload symbols from system shared libraries, to
# avoid conflicts with the minsyms in the program. E.g.,
diff --git a/gdb/testsuite/gdb.base/nofield.exp b/gdb/testsuite/gdb.base/nofield.exp
index 2e88725..31d0234 100644
--- a/gdb/testsuite/gdb.base/nofield.exp
+++ b/gdb/testsuite/gdb.base/nofield.exp
@@ -23,7 +23,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
set eol "\r\n"
set sp "\[ \t\]*"
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test "ptype struct not_empty" \
"type = struct not_empty {$eol${sp}void \\*e;$eol${sp}void \\*u;$eol}"
diff --git a/gdb/testsuite/gdb.base/nostdlib.exp b/gdb/testsuite/gdb.base/nostdlib.exp
index ecf09a8..8dcefcf 100644
--- a/gdb/testsuite/gdb.base/nostdlib.exp
+++ b/gdb/testsuite/gdb.base/nostdlib.exp
@@ -49,7 +49,8 @@ foreach_with_prefix pie { "nopie" "pie" } {
return -1
}
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_breakpoint "*marker"
diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp
index a0947e2..8ac9f4e 100644
--- a/gdb/testsuite/gdb.base/options.exp
+++ b/gdb/testsuite/gdb.base/options.exp
@@ -205,7 +205,8 @@ proc_with_prefix test-print {{prefix ""}} {
}
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return
@@ -317,7 +318,8 @@ proc_with_prefix test-backtrace {} {
"backtrace no-filters"
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
index a831050..d60a0ea 100644
--- a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
+++ b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
@@ -31,7 +31,8 @@ proc test_ctrlc_while_target_running_does_not_paginate {} {
set testline [gdb_get_line_number "after sleep"]
with_test_prefix "ctrlc target running" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
index dfd7823..40f98fc 100644
--- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp
@@ -30,7 +30,8 @@ proc test_bg_execution_pagination_return {} {
global decimal
with_test_prefix "paginate" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/paginate-inferior-exit.exp b/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
index 76176e2..6cc992b 100644
--- a/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
+++ b/gdb/testsuite/gdb.base/paginate-inferior-exit.exp
@@ -29,7 +29,8 @@ proc test_paginate_inferior_exited {} {
global inferior_exited_re
with_test_prefix "paginate" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/patch.exp b/gdb/testsuite/gdb.base/patch.exp
index 69e5581..f6abc59 100644
--- a/gdb/testsuite/gdb.base/patch.exp
+++ b/gdb/testsuite/gdb.base/patch.exp
@@ -34,7 +34,8 @@ with_test_prefix "exec" {
gdb_test "p extern_global = 2" " = 2" "modify value"
gdb_test "p extern_global" " = 2" "value modified"
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "p extern_global" " = 2" "value modified persisted"
}
@@ -43,7 +44,8 @@ with_test_prefix "exec" {
# Generate a core file.
with_test_prefix "gcore" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/pc-not-saved.exp b/gdb/testsuite/gdb.base/pc-not-saved.exp
index 16e11bc..e761e93 100644
--- a/gdb/testsuite/gdb.base/pc-not-saved.exp
+++ b/gdb/testsuite/gdb.base/pc-not-saved.exp
@@ -60,7 +60,8 @@ gdb_assert { ![string equal $pc unknown] } \
"check we read the frame's PC"
# Restart and load the Python unwinder script.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_test_no_output "source ${remote_python_file}" "load python file"
# Tell the Python unwinder to use the frame-id we cached above.
diff --git a/gdb/testsuite/gdb.base/pie-fork.exp b/gdb/testsuite/gdb.base/pie-fork.exp
index 86407b4..9d232c8 100644
--- a/gdb/testsuite/gdb.base/pie-fork.exp
+++ b/gdb/testsuite/gdb.base/pie-fork.exp
@@ -29,7 +29,8 @@ if [build_executable "failed to prepare" $testfile $srcfile $opts] {
proc setup_test {detach_on_fork {follow_fork_mode "parent"}} {
global binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return
diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp
index ab02181..4d4d58e 100644
--- a/gdb/testsuite/gdb.base/pointers.exp
+++ b/gdb/testsuite/gdb.base/pointers.exp
@@ -32,7 +32,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp
index e7bfba0..70a7d8b 100644
--- a/gdb/testsuite/gdb.base/pr11022.exp
+++ b/gdb/testsuite/gdb.base/pr11022.exp
@@ -24,7 +24,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp
index c9e2480..91e818b 100644
--- a/gdb/testsuite/gdb.base/print-symbol-loading.exp
+++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp
@@ -35,7 +35,8 @@ if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib ${binfile_lib}
if ![runto lib] {
@@ -94,7 +95,8 @@ proc test_load_shlib { print_symbol_loading } {
global binfile
global gdb_prompt
with_test_prefix "shlib ${print_symbol_loading}" {
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return -1
}
diff --git a/gdb/testsuite/gdb.base/prologue.exp b/gdb/testsuite/gdb.base/prologue.exp
index 0d3902d..736e779 100644
--- a/gdb/testsuite/gdb.base/prologue.exp
+++ b/gdb/testsuite/gdb.base/prologue.exp
@@ -23,7 +23,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/ptr-typedef.exp b/gdb/testsuite/gdb.base/ptr-typedef.exp
index 53d03cc..8bffb26 100644
--- a/gdb/testsuite/gdb.base/ptr-typedef.exp
+++ b/gdb/testsuite/gdb.base/ptr-typedef.exp
@@ -22,7 +22,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Get things started.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if ![runto marker1] {
untested "couldn't run to marker1"
diff --git a/gdb/testsuite/gdb.base/quit-live.exp b/gdb/testsuite/gdb.base/quit-live.exp
index a95c980..46579d4 100644
--- a/gdb/testsuite/gdb.base/quit-live.exp
+++ b/gdb/testsuite/gdb.base/quit-live.exp
@@ -95,7 +95,8 @@ proc quit_with_live_inferior {appear_how extra_inferior quit_how} {
set test_spawn_id ""
if {$appear_how != "attach-nofile"} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
} else {
clean_restart
}
diff --git a/gdb/testsuite/gdb.base/random-signal.exp b/gdb/testsuite/gdb.base/random-signal.exp
index bb5b482..16f9467 100644
--- a/gdb/testsuite/gdb.base/random-signal.exp
+++ b/gdb/testsuite/gdb.base/random-signal.exp
@@ -49,7 +49,8 @@ proc do_test {} {
# while gdb is processing the internal software watchtpoint
# single-step. With remote debugging, the ctrl-c reaches GDB first.
with_test_prefix "run" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return -1
@@ -62,7 +63,8 @@ with_test_prefix "run" {
# reaches GDB first. Test that as well.
with_test_prefix "attach" {
if {[can_spawn_for_attach]} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
diff --git a/gdb/testsuite/gdb.base/readline-ask.exp b/gdb/testsuite/gdb.base/readline-ask.exp
index 2948970..0fdfc76 100644
--- a/gdb/testsuite/gdb.base/readline-ask.exp
+++ b/gdb/testsuite/gdb.base/readline-ask.exp
@@ -27,7 +27,8 @@ setenv TERM dumb
# INPUTRC gets reset for the next testfile.
setenv INPUTRC $inputrc
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if { ![readline_is_used] } {
unsupported "completion doesn't work when readline isn't used."
diff --git a/gdb/testsuite/gdb.base/readline-commands-eof.exp b/gdb/testsuite/gdb.base/readline-commands-eof.exp
index 021e40f..d55dd1d 100644
--- a/gdb/testsuite/gdb.base/readline-commands-eof.exp
+++ b/gdb/testsuite/gdb.base/readline-commands-eof.exp
@@ -43,7 +43,8 @@ if { ![readline_supports_eof_flag] } {
# arrived. If it is then GDB will start displaying extra blank lines
# after each line of input.
proc run_test {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
gdb_breakpoint main
diff --git a/gdb/testsuite/gdb.base/relativedebug.exp b/gdb/testsuite/gdb.base/relativedebug.exp
index d713771..2465ffd 100644
--- a/gdb/testsuite/gdb.base/relativedebug.exp
+++ b/gdb/testsuite/gdb.base/relativedebug.exp
@@ -24,7 +24,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Get things started.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
runto_main
diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp
index 9917faf..c1d6a99 100644
--- a/gdb/testsuite/gdb.base/remote.exp
+++ b/gdb/testsuite/gdb.base/remote.exp
@@ -164,7 +164,8 @@ gdb_load_timed $binfile "limit" 0
# Get the size of random_data table (defaults to 48K).
set sizeof_random_data [get_sizeof "random_data" 48*1024]
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
#
# Part THREE: Check the upload behavior.
diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp
index 7e7d2c8..6c71f40 100644
--- a/gdb/testsuite/gdb.base/reread.exp
+++ b/gdb/testsuite/gdb.base/reread.exp
@@ -106,7 +106,8 @@ foreach_with_prefix opts { "" "pie" } {
gdb_rename_execfile ${binfile1} ${binfile}
# Restart GDB entirely.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
# Set a breakpoint on foo and run to it.
gdb_test "break foo" \
diff --git a/gdb/testsuite/gdb.base/restore.exp b/gdb/testsuite/gdb.base/restore.exp
index 9724032..5448fb4 100644
--- a/gdb/testsuite/gdb.base/restore.exp
+++ b/gdb/testsuite/gdb.base/restore.exp
@@ -96,7 +96,8 @@ restore_tests
set timeout $prev_timeout
# Test PR cli/23785
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if { ![runto_main] } {
return -1
}
diff --git a/gdb/testsuite/gdb.base/return2.exp b/gdb/testsuite/gdb.base/return2.exp
index b657c11..e90a60b 100644
--- a/gdb/testsuite/gdb.base/return2.exp
+++ b/gdb/testsuite/gdb.base/return2.exp
@@ -103,7 +103,8 @@ proc return2_tests { } {
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
set timeout 30
return2_tests
diff --git a/gdb/testsuite/gdb.base/run-attach-while-running.exp b/gdb/testsuite/gdb.base/run-attach-while-running.exp
index ae1388d..7b40a5f 100644
--- a/gdb/testsuite/gdb.base/run-attach-while-running.exp
+++ b/gdb/testsuite/gdb.base/run-attach-while-running.exp
@@ -60,7 +60,8 @@ proc_with_prefix test { non-stop threaded run-or-attach } {
set ::GDBFLAGS "$::GDBFLAGS -ex \"maint set target-non-stop on\""
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
if { ![runto_main] } {
diff --git a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
index eaee010..2c75d06 100644
--- a/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
+++ b/gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
@@ -56,7 +56,8 @@ proc do_test { action1 action2 } {
save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maintenance set target-non-stop on\""
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
# Ensure we are at least after the getpid call, should we need it.
diff --git a/gdb/testsuite/gdb.base/run-fail-twice.exp b/gdb/testsuite/gdb.base/run-fail-twice.exp
index af8c61b..07cbdda 100644
--- a/gdb/testsuite/gdb.base/run-fail-twice.exp
+++ b/gdb/testsuite/gdb.base/run-fail-twice.exp
@@ -43,7 +43,8 @@ proc test_run {testname} {
proc_with_prefix test {} {
global gdb_prompt binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set confirm off"
diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp
index 2c44566..d71d872 100644
--- a/gdb/testsuite/gdb.base/savedregs.exp
+++ b/gdb/testsuite/gdb.base/savedregs.exp
@@ -35,7 +35,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
# get things started
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Advance to main
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/sep.exp b/gdb/testsuite/gdb.base/sep.exp
index 5a1e077..6abf356 100644
--- a/gdb/testsuite/gdb.base/sep.exp
+++ b/gdb/testsuite/gdb.base/sep.exp
@@ -26,7 +26,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
set location [gdb_get_line_number "say_hello" "sep-proc.c"]
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Try to display the source code inside a file which is included by
# another source file. The purpose of this test is to verify that
@@ -45,7 +46,8 @@ gdb_test "list sep-proc.c:$location" \
# Try the same, but this time with a breakpoint. We need to exit
# GDB to make sure that we havn't loaded the full symbols yet when
# we test the breakpoint insertion.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
set test "breakpoint inside included file"
gdb_test_multiple "break sep-proc.c:$location" "$test" {
diff --git a/gdb/testsuite/gdb.base/sepsymtab.exp b/gdb/testsuite/gdb.base/sepsymtab.exp
index f5e8705..ed7a7a2 100644
--- a/gdb/testsuite/gdb.base/sepsymtab.exp
+++ b/gdb/testsuite/gdb.base/sepsymtab.exp
@@ -31,7 +31,8 @@ if [gdb_gnu_strip_debug $binfile no-main] {
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
set command "info sym main"
set command_regex [string_to_regexp $command]
diff --git a/gdb/testsuite/gdb.base/set-cwd.exp b/gdb/testsuite/gdb.base/set-cwd.exp
index 72a2632..73a200f 100644
--- a/gdb/testsuite/gdb.base/set-cwd.exp
+++ b/gdb/testsuite/gdb.base/set-cwd.exp
@@ -184,7 +184,9 @@ proc_with_prefix test_cwd_reset { } {
}
test_cd_into_dir
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
test_tilde_expansion
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
test_cwd_reset
diff --git a/gdb/testsuite/gdb.base/set-inferior-tty.exp b/gdb/testsuite/gdb.base/set-inferior-tty.exp
index 64ec57b..c9b0a96 100644
--- a/gdb/testsuite/gdb.base/set-inferior-tty.exp
+++ b/gdb/testsuite/gdb.base/set-inferior-tty.exp
@@ -24,7 +24,8 @@ if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] ==
proc test_set_inferior_tty { command } {
global binfile
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "$command hello" "set inferior-tty to hello"
gdb_test "show inferior-tty" \
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index 79ff913..0e38a9d 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -29,7 +29,8 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}]
proc_with_prefix test_setshow_annotate {} {
# Start with a fresh gdb
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
@@ -78,7 +79,8 @@ proc_with_prefix test_setshow_annotate {} {
}
proc_with_prefix test_setshow_args {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/settings.exp b/gdb/testsuite/gdb.base/settings.exp
index 5e7cc24..d83023b 100644
--- a/gdb/testsuite/gdb.base/settings.exp
+++ b/gdb/testsuite/gdb.base/settings.exp
@@ -531,7 +531,8 @@ proc test-string {variant} {
global srcfile binfile
# Load symbols for the completion test below.
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Use these variables to make sure we don't call the wrong command
# by mistake.
diff --git a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
index 920f435..aa4b300 100644
--- a/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
+++ b/gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
@@ -91,7 +91,8 @@ proc do_prepare_inferior { } {
proc do_test { var_value { var_name "" } { var_name_match "" } { var_value_match "" } } {
global binfile test_var_name
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if { $var_name == "" } {
set var_name $test_var_name
@@ -146,7 +147,8 @@ with_test_prefix "strange named var" {
proc test_set_unset_vars { } {
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
with_test_prefix "set 3 environment variables" {
# Set some environment variables
@@ -205,7 +207,8 @@ with_test_prefix "test set/unset of vars" {
proc test_unset { } {
global hex decimal binfile gdb_prompt
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
do_prepare_inferior
@@ -234,7 +237,8 @@ proc test_unset { } {
}
with_test_prefix "set-then-unset" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# Test if setting and then unsetting $HOME works.
gdb_test_no_output "set environment HOME = test" "set HOME as test"
diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp
index 6a5f6d8..d3ff1c3 100644
--- a/gdb/testsuite/gdb.base/shlib-call.exp
+++ b/gdb/testsuite/gdb.base/shlib-call.exp
@@ -59,7 +59,8 @@ if { [gdb_compile_shlib ${lib1src} ${lib1} $lib_opts] != ""
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib1
gdb_load_shlib $lib2
@@ -161,7 +162,8 @@ gdb_test "step" "mainshr1 \\(g=4\\) at.*return 2.g;" \
# Start with a fresh gdb.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# PR's 16495, 18213
# test that we can re-set breakpoints in shared libraries
diff --git a/gdb/testsuite/gdb.base/shlib-unload.exp b/gdb/testsuite/gdb.base/shlib-unload.exp
index 9d47416..0e1369e 100644
--- a/gdb/testsuite/gdb.base/shlib-unload.exp
+++ b/gdb/testsuite/gdb.base/shlib-unload.exp
@@ -69,7 +69,8 @@ proc_with_prefix test_bp_modified_events {} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
@@ -114,7 +115,8 @@ proc_with_prefix test_bp_modified_events {} {
# Check that GDB disables dprintf breakpoints within a shared library
# when the shared library is unloaded.
proc_with_prefix test_dprintf_after_unload {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
@@ -143,7 +145,8 @@ proc_with_prefix test_dprintf_after_unload {} {
# inferior. We should not get an error about re-setting the dprintf
# breakpoint.
proc_with_prefix test_dprintf_with_rerun {} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
@@ -238,7 +241,8 @@ proc_with_prefix test_silent_nosharedlib {} {
}
foreach_with_prefix type { breakpoint dprintf } {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index 8ab64a8..2bd79af 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -65,7 +65,8 @@ if { [gdb_compile_shlib $lib1src $lib1_sl $lib_opts] != ""} {
# Start with a fresh gdb.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib1_sl
gdb_load_shlib $lib2_sl
diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp
index 978ddeb..47013a0 100644
--- a/gdb/testsuite/gdb.base/sigaltstack.exp
+++ b/gdb/testsuite/gdb.base/sigaltstack.exp
@@ -33,7 +33,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
# get things started
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Pass all the alarms straight through (but verbosely)
gdb_test "handle SIGALRM print pass nostop"
diff --git a/gdb/testsuite/gdb.base/sigchld.exp b/gdb/testsuite/gdb.base/sigchld.exp
index 51d41c3..4011241 100644
--- a/gdb/testsuite/gdb.base/sigchld.exp
+++ b/gdb/testsuite/gdb.base/sigchld.exp
@@ -24,7 +24,8 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
runto_main
diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp
index d63febb..52f7140 100644
--- a/gdb/testsuite/gdb.base/siginfo-obj.exp
+++ b/gdb/testsuite/gdb.base/siginfo-obj.exp
@@ -118,7 +118,8 @@ with_test_prefix "validate modified siginfo fields" {
# Test siginfo preservation in core files.
if {$gcore_created} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "core $gcorefile" "Core was generated by.*" \
"core [file tail $gcorefile]"
diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp
index bf0d58c..270b4e1 100644
--- a/gdb/testsuite/gdb.base/siginfo-thread.exp
+++ b/gdb/testsuite/gdb.base/siginfo-thread.exp
@@ -27,7 +27,8 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" \
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Advance to main
if {![runto_main]} {
@@ -92,7 +93,8 @@ gdb_test "p \$_siginfo.si_signo == $ssi_signo" " = 0" \
# Test siginfo preservation in core files.
if {$gcore_created} {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "core $gcorefile" "Core was generated by.*" \
"core [file tail $gcorefile]"
diff --git a/gdb/testsuite/gdb.base/signals-state-child.exp b/gdb/testsuite/gdb.base/signals-state-child.exp
index 608951f..00ad7f5 100644
--- a/gdb/testsuite/gdb.base/signals-state-child.exp
+++ b/gdb/testsuite/gdb.base/signals-state-child.exp
@@ -97,7 +97,8 @@ remote_close target
# Now run the program through gdb, and dump its initial signal actions
# and mask in "gdb.txt".
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return -1
diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp
index d311361..5ff1e38 100644
--- a/gdb/testsuite/gdb.base/signals.exp
+++ b/gdb/testsuite/gdb.base/signals.exp
@@ -58,7 +58,8 @@ proc test_handle_all_print {} {
}
test_handle_all_print
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {[runto_main]} {
diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp
index 478e471..9ad772f 100644
--- a/gdb/testsuite/gdb.base/signull.exp
+++ b/gdb/testsuite/gdb.base/signull.exp
@@ -37,7 +37,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
#
# Run to `main' where we begin our tests.
diff --git a/gdb/testsuite/gdb.base/sigrepeat.exp b/gdb/testsuite/gdb.base/sigrepeat.exp
index 9afa346..8fa92af 100644
--- a/gdb/testsuite/gdb.base/sigrepeat.exp
+++ b/gdb/testsuite/gdb.base/sigrepeat.exp
@@ -30,7 +30,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
}
# get things started
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
# Advance to main
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
index b49105c..2df5dd0 100644
--- a/gdb/testsuite/gdb.base/sigstep.exp
+++ b/gdb/testsuite/gdb.base/sigstep.exp
@@ -40,7 +40,8 @@ set other_handler_location [gdb_get_line_number "other handler location"]
proc restart {} {
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test "display/i \$pc"
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.exp b/gdb/testsuite/gdb.base/so-impl-ld.exp
index d5c4143..1e309e5 100644
--- a/gdb/testsuite/gdb.base/so-impl-ld.exp
+++ b/gdb/testsuite/gdb.base/so-impl-ld.exp
@@ -33,7 +33,8 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
# Start with a fresh gdb
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib_sl
# This program implicitly loads SOM shared libraries.
diff --git a/gdb/testsuite/gdb.base/solib-abort.exp b/gdb/testsuite/gdb.base/solib-abort.exp
index 2f6d636..ab162a9 100644
--- a/gdb/testsuite/gdb.base/solib-abort.exp
+++ b/gdb/testsuite/gdb.base/solib-abort.exp
@@ -38,7 +38,8 @@ if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/solib-disc.exp b/gdb/testsuite/gdb.base/solib-disc.exp
index ba7dcce..880f632 100644
--- a/gdb/testsuite/gdb.base/solib-disc.exp
+++ b/gdb/testsuite/gdb.base/solib-disc.exp
@@ -44,7 +44,8 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $libobj
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/solib-symbol.exp b/gdb/testsuite/gdb.base/solib-symbol.exp
index f3ca612..4d3494c 100644
--- a/gdb/testsuite/gdb.base/solib-symbol.exp
+++ b/gdb/testsuite/gdb.base/solib-symbol.exp
@@ -34,7 +34,8 @@ if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $binfile_lib
# Set a breakpoint in the binary.
diff --git a/gdb/testsuite/gdb.base/solib-weak.exp b/gdb/testsuite/gdb.base/solib-weak.exp
index 2d75a91..511ef37 100644
--- a/gdb/testsuite/gdb.base/solib-weak.exp
+++ b/gdb/testsuite/gdb.base/solib-weak.exp
@@ -84,7 +84,8 @@ proc do_test { lib1opts lib2opts lib1first } {
}
with_test_prefix $testopts {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_load_shlib $lib1
gdb_load_shlib $lib2
diff --git a/gdb/testsuite/gdb.base/source-dir.exp b/gdb/testsuite/gdb.base/source-dir.exp
index 3b0c5dd..e07a117 100644
--- a/gdb/testsuite/gdb.base/source-dir.exp
+++ b/gdb/testsuite/gdb.base/source-dir.exp
@@ -119,7 +119,8 @@ proc test_truncated_comp_dir {} {
}
}
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
if { [ishost *-*-mingw*] } {
gdb_test_no_output "set directories \$cdir;\$cwd"
diff --git a/gdb/testsuite/gdb.base/stack-checking.exp b/gdb/testsuite/gdb.base/stack-checking.exp
index 5e55b43..15fc677 100644
--- a/gdb/testsuite/gdb.base/stack-checking.exp
+++ b/gdb/testsuite/gdb.base/stack-checking.exp
@@ -21,7 +21,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/startup-with-shell.exp b/gdb/testsuite/gdb.base/startup-with-shell.exp
index 9c016b4..25b161a 100644
--- a/gdb/testsuite/gdb.base/startup-with-shell.exp
+++ b/gdb/testsuite/gdb.base/startup-with-shell.exp
@@ -42,7 +42,8 @@ run_on_host \
proc initial_setup_simple { startup_with_shell run_args } {
global hex decimal binfile unique_file
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set startup-with-shell $startup_with_shell"
gdb_test_no_output "set print characters unlimited"
diff --git a/gdb/testsuite/gdb.base/step-over-no-symbols.exp b/gdb/testsuite/gdb.base/step-over-no-symbols.exp
index 2eb8efe..1a91986 100644
--- a/gdb/testsuite/gdb.base/step-over-no-symbols.exp
+++ b/gdb/testsuite/gdb.base/step-over-no-symbols.exp
@@ -47,7 +47,8 @@ proc test_step_over { displaced } {
global hex
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return -1
diff --git a/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp b/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
index 2dc67ea..2dde3bb 100644
--- a/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
+++ b/gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
@@ -36,7 +36,8 @@ proc test {non_stop displaced always_inserted} {
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop $non_stop\""
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
}
gdb_test_no_output "set displaced-stepping $displaced"
diff --git a/gdb/testsuite/gdb.base/step-test.exp b/gdb/testsuite/gdb.base/step-test.exp
index 28eccf7..39833a3 100644
--- a/gdb/testsuite/gdb.base/step-test.exp
+++ b/gdb/testsuite/gdb.base/step-test.exp
@@ -24,7 +24,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return 0
diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp
index 6b1b08e..3dde79a 100644
--- a/gdb/testsuite/gdb.base/style.exp
+++ b/gdb/testsuite/gdb.base/style.exp
@@ -885,7 +885,8 @@ proc previous_line_is_ok { str } {
# prompt, the previous line disables styling as expected.
proc test_pagination_prompt_styling {} {
with_ansi_styling_terminal {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
if {![runto_main]} {
@@ -981,7 +982,8 @@ proc test_pagination_prompt_styling {} {
# default style once the logging file has finished.
proc test_pagination_continue_styling_1 { length } {
with_ansi_styling_terminal {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
set filename [string repeat "ax" $length]
@@ -1036,7 +1038,8 @@ proc test_pagination_continue_styling { } {
# Check to see if the Python styling of disassembler output is
# expected or not, this styling requires Python support in GDB, and
# the Python pygments module to be available.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {[allow_python_tests] && [gdb_py_module_available "pygments"]} {
set python_disassembly_styling true
} else {
diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp
index 8197c0e..6570fdb 100644
--- a/gdb/testsuite/gdb.base/sym-file.exp
+++ b/gdb/testsuite/gdb.base/sym-file.exp
@@ -70,7 +70,8 @@ gdb_load_shlib ${lib_so}
proc do_test { remove_expr } {
global lib_basename lib_syms srcfile srcfile3
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/symtab-search-order.exp b/gdb/testsuite/gdb.base/symtab-search-order.exp
index cf0d507..34b1db0 100644
--- a/gdb/testsuite/gdb.base/symtab-search-order.exp
+++ b/gdb/testsuite/gdb.base/symtab-search-order.exp
@@ -33,7 +33,8 @@ if { [gdb_compile_shlib $lib1src $lib1 $lib_opts] != ""
# Start with a fresh gdb.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib1
if ![runto_main] {
diff --git a/gdb/testsuite/gdb.base/testenv.exp b/gdb/testsuite/gdb.base/testenv.exp
index beb59d2..fb7a584 100644
--- a/gdb/testsuite/gdb.base/testenv.exp
+++ b/gdb/testsuite/gdb.base/testenv.exp
@@ -90,7 +90,8 @@ proc find_env {varname} {
proc_with_prefix test_set_unset_env {} {
global binfile
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# First test with no TEST_GDB_VAR.
with_test_prefix "test1" {
@@ -151,7 +152,8 @@ proc_with_prefix test_inherit_env_var {} {
save_vars {env(TEST_GDB_GLOBAL)} {
set env(TEST_GDB_GLOBAL) "Global environment value"
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
gdb_breakpoint $bp_line
diff --git a/gdb/testsuite/gdb.base/tls-dlobj.exp b/gdb/testsuite/gdb.base/tls-dlobj.exp
index 32e869e..1509ec8 100644
--- a/gdb/testsuite/gdb.base/tls-dlobj.exp
+++ b/gdb/testsuite/gdb.base/tls-dlobj.exp
@@ -56,7 +56,8 @@ proc gdb_test_with_xfail { cmd re cond} {
}
proc do_tests {force_internal_tls} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if ![runto_main] {
return
}
@@ -288,7 +289,8 @@ proc do_tests {force_internal_tls} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
set core_loaded [gdb_core_cmd $corefile "load corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/tls-multiobj.exp b/gdb/testsuite/gdb.base/tls-multiobj.exp
index 2a52610..eb3721e 100644
--- a/gdb/testsuite/gdb.base/tls-multiobj.exp
+++ b/gdb/testsuite/gdb.base/tls-multiobj.exp
@@ -26,7 +26,8 @@ set lib2obj [standard_output_file "${testfile}2-lib.so"]
set lib3obj [standard_output_file "${testfile}3-lib.so"]
proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if ![runto_main] {
return
}
@@ -128,7 +129,8 @@ proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
set core_loaded [gdb_core_cmd $corefile "load corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/tls-nothreads.exp b/gdb/testsuite/gdb.base/tls-nothreads.exp
index 105e686..0be78a2 100644
--- a/gdb/testsuite/gdb.base/tls-nothreads.exp
+++ b/gdb/testsuite/gdb.base/tls-nothreads.exp
@@ -18,7 +18,8 @@ source $srcdir/$subdir/tls-common.exp.tcl
standard_testfile
proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
if ![runto_main] {
return
}
@@ -155,7 +156,8 @@ proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
return
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
set core_loaded [gdb_core_cmd $corefile "load corefile"]
if { $core_loaded == -1 } {
diff --git a/gdb/testsuite/gdb.base/twice.exp b/gdb/testsuite/gdb.base/twice.exp
index 6f49c46..995cd4d 100644
--- a/gdb/testsuite/gdb.base/twice.exp
+++ b/gdb/testsuite/gdb.base/twice.exp
@@ -32,7 +32,8 @@ if { [gdb_compile $local_srcfile "${binfile}" executable $options] != "" } {
# Start with a fresh gdb.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
if {[runto_main]} {
# Test that GDB can still detect whether we have line numbers
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index da060b9..f5d8582 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -32,7 +32,8 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_load_shlib ${libobj}
if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.base/unload.exp b/gdb/testsuite/gdb.base/unload.exp
index 0761f27..b2d848d 100644
--- a/gdb/testsuite/gdb.base/unload.exp
+++ b/gdb/testsuite/gdb.base/unload.exp
@@ -50,7 +50,8 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib_sl
gdb_load_shlib $lib_sl2
diff --git a/gdb/testsuite/gdb.base/varargs.exp b/gdb/testsuite/gdb.base/varargs.exp
index a34a578..534971c 100644
--- a/gdb/testsuite/gdb.base/varargs.exp
+++ b/gdb/testsuite/gdb.base/varargs.exp
@@ -49,7 +49,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
# Start with a fresh gdb.
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0"
diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp
index 4a5c1c2..e1b54c0 100644
--- a/gdb/testsuite/gdb.base/watch_thread_num.exp
+++ b/gdb/testsuite/gdb.base/watch_thread_num.exp
@@ -31,7 +31,8 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
return -1
}
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index fa63edb..afdb82e 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -35,7 +35,8 @@ gdb_test "detach" "Detaching from program: .*, process $testpid\r\n\\\[Inferior
# A clean restart is needed to force the hardware watchpoint setup
# logic to run post attach rather than post inferior launch.
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_test "attach $testpid" "Attaching to program: .*, process $testpid.*" "attach twice"
diff --git a/gdb/testsuite/gdb.base/watchpoint-running.exp b/gdb/testsuite/gdb.base/watchpoint-running.exp
index 1a5f9c3..04c4c52 100644
--- a/gdb/testsuite/gdb.base/watchpoint-running.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-running.exp
@@ -43,7 +43,8 @@ proc test {stop_mode hw} {
# default.
append ::GDBFLAGS " -ex \"maint set target-non-stop on\""
}
- clean_restart $::binfile
+ clean_restart
+ gdb_load $::binfile
}
gdb_test_no_output "set can-use-hw-watchpoints $hw"
diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp
index 28b8d08..7f58a83 100644
--- a/gdb/testsuite/gdb.base/watchpoint-solib.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp
@@ -49,7 +49,8 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_load_shlib $lib_sl
runto_main
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 2bedcaa..163ec3b 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -129,7 +129,8 @@ proc test {always_inserted} {
with_test_prefix "always-inserted $always_inserted" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if {![runto_main]} {
return
diff --git a/gdb/testsuite/gdb.base/watchpoints.exp b/gdb/testsuite/gdb.base/watchpoints.exp
index 37baa5e..d8e4d63 100644
--- a/gdb/testsuite/gdb.base/watchpoints.exp
+++ b/gdb/testsuite/gdb.base/watchpoints.exp
@@ -53,7 +53,8 @@ with_test_prefix "before inferior start" {
# This will turn hardware watchpoints back on and delete the watchpoint
# we just created.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
# Disable hardware watchpoints if necessary.
if {!$allow_hw_watchpoint_tests_p} {
diff --git a/gdb/testsuite/gdb.base/with-mf.exp b/gdb/testsuite/gdb.base/with-mf.exp
index 564d5d7..3ac5e1d 100644
--- a/gdb/testsuite/gdb.base/with-mf.exp
+++ b/gdb/testsuite/gdb.base/with-mf.exp
@@ -29,7 +29,8 @@ if { [ensure_gdb_index $binfile] == -1 } {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
gdb_test "with language ada -- print g_s" \
" = \\(a => 1, b => 2, c => 3\\)"
diff --git a/gdb/testsuite/gdb.base/with.exp b/gdb/testsuite/gdb.base/with.exp
index a9b4a6c..d766e5d 100644
--- a/gdb/testsuite/gdb.base/with.exp
+++ b/gdb/testsuite/gdb.base/with.exp
@@ -25,7 +25,8 @@ if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
# Test "maint with". VALUES is a list of values. A nested "with" is
# performed with each combination of pair of values from this list.
@@ -178,7 +179,8 @@ with_test_prefix "user-defined" {
# Check repeating.
with_test_prefix "repeat" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
# "with" with no command reinvokes the previous command.
gdb_test "with language ada" \
@@ -209,7 +211,8 @@ with_test_prefix "repeat" {
# Basic run control.
with_test_prefix "run control" {
- clean_restart $binfile
+ clean_restart
+ gdb_load $binfile
if ![runto_main] {
return