]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix clean_restart <absolute filename> in gdb.base, part 1
authorTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 13:36:23 +0000 (15:36 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 13:36:23 +0000 (15:36 +0200)
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.

192 files changed:
gdb/testsuite/gdb.base/access-mem-running.exp
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/args.exp
gdb/testsuite/gdb.base/arrayidx.exp
gdb/testsuite/gdb.base/assign.exp
gdb/testsuite/gdb.base/attach-fail-twice.exp
gdb/testsuite/gdb.base/attach-non-pgrp-leader.exp
gdb/testsuite/gdb.base/attach-wait-input.exp
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/auxv.exp
gdb/testsuite/gdb.base/basic-edit-cmd.exp
gdb/testsuite/gdb.base/bfp-test.exp
gdb/testsuite/gdb.base/bg-exec-sigint-bp-cond.exp
gdb/testsuite/gdb.base/bg-execution-repeat.exp
gdb/testsuite/gdb.base/bigcore.exp
gdb/testsuite/gdb.base/bitfields2.exp
gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
gdb/testsuite/gdb.base/bp-cond-failure.exp
gdb/testsuite/gdb.base/bp-disabled-by-cond.exp
gdb/testsuite/gdb.base/bp-permanent.exp
gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
gdb/testsuite/gdb.base/bt-selected-frame.exp
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-signal-resume.exp
gdb/testsuite/gdb.base/callexit.exp
gdb/testsuite/gdb.base/catch-syscall.exp
gdb/testsuite/gdb.base/checkpoint.exp
gdb/testsuite/gdb.base/chng-syms.exp
gdb/testsuite/gdb.base/clear_non_user_bp.exp
gdb/testsuite/gdb.base/code-expr.exp
gdb/testsuite/gdb.base/cond-expr.exp
gdb/testsuite/gdb.base/condbreak-multi-context.exp
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/continue-after-aborted-step-over.exp
gdb/testsuite/gdb.base/corefile-exec-context.exp
gdb/testsuite/gdb.base/corefile-shmem-zero-id.exp
gdb/testsuite/gdb.base/corefile.exp
gdb/testsuite/gdb.base/corefile2.exp
gdb/testsuite/gdb.base/corefile3.exp
gdb/testsuite/gdb.base/default-args.exp
gdb/testsuite/gdb.base/detach-while-running.exp
gdb/testsuite/gdb.base/detach.exp
gdb/testsuite/gdb.base/dfp-test.exp
gdb/testsuite/gdb.base/display.exp
gdb/testsuite/gdb.base/dlmopen-ns-ids.exp
gdb/testsuite/gdb.base/dlmopen.exp
gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
gdb/testsuite/gdb.base/dprintf-detach.exp
gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
gdb/testsuite/gdb.base/dprintf-pending.exp
gdb/testsuite/gdb.base/dprintf.exp
gdb/testsuite/gdb.base/dso2dso.exp
gdb/testsuite/gdb.base/dtrace-probe.exp
gdb/testsuite/gdb.base/dump.exp
gdb/testsuite/gdb.base/duplicate-bp.exp
gdb/testsuite/gdb.base/eh_return.exp
gdb/testsuite/gdb.base/errno.exp
gdb/testsuite/gdb.base/eval-skip.exp
gdb/testsuite/gdb.base/exe-lock.exp
gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
gdb/testsuite/gdb.base/exprs.exp
gdb/testsuite/gdb.base/fileio.exp
gdb/testsuite/gdb.base/find.exp
gdb/testsuite/gdb.base/fixsection.exp
gdb/testsuite/gdb.base/float128.exp
gdb/testsuite/gdb.base/floatn.exp
gdb/testsuite/gdb.base/fork-no-detach-follow-child-dlopen.exp
gdb/testsuite/gdb.base/fork-print-inferior-events.exp
gdb/testsuite/gdb.base/frame-args.exp
gdb/testsuite/gdb.base/frame-info-consistent.exp
gdb/testsuite/gdb.base/frame-view.exp
gdb/testsuite/gdb.base/fullname.exp
gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
gdb/testsuite/gdb.base/gcore-relro-pie.exp
gdb/testsuite/gdb.base/gcore-relro.exp
gdb/testsuite/gdb.base/gcore-tls-pie.exp
gdb/testsuite/gdb.base/gcore.exp
gdb/testsuite/gdb.base/gdb1250.exp
gdb/testsuite/gdb.base/gdb1555.exp
gdb/testsuite/gdb.base/gdbindex-stabs.exp
gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
gdb/testsuite/gdb.base/gnu_vector.exp
gdb/testsuite/gdb.base/hashline1.exp
gdb/testsuite/gdb.base/hashline2.exp
gdb/testsuite/gdb.base/hashline3.exp
gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
gdb/testsuite/gdb.base/hook-stop.exp
gdb/testsuite/gdb.base/huge.exp
gdb/testsuite/gdb.base/infcall-exec.exp
gdb/testsuite/gdb.base/infcall-failure.exp
gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
gdb/testsuite/gdb.base/infcall-timeout.exp
gdb/testsuite/gdb.base/inferior-args.exp
gdb/testsuite/gdb.base/inferior-died.exp
gdb/testsuite/gdb.base/info-proc.exp
gdb/testsuite/gdb.base/info_sources_2.exp
gdb/testsuite/gdb.base/internal-string-values.exp
gdb/testsuite/gdb.base/interrupt-daemon-attach.exp
gdb/testsuite/gdb.base/interrupt-daemon.exp
gdb/testsuite/gdb.base/jit-reader-exec.exp
gdb/testsuite/gdb.base/jit-reader-simple.exp
gdb/testsuite/gdb.base/kill-during-detach.exp
gdb/testsuite/gdb.base/killed-outside.exp
gdb/testsuite/gdb.base/langs.exp
gdb/testsuite/gdb.base/lineinc.exp
gdb/testsuite/gdb.base/list-missing-source.exp
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/logical.exp
gdb/testsuite/gdb.base/long_long.exp
gdb/testsuite/gdb.base/longjmp.exp
gdb/testsuite/gdb.base/macscp.exp
gdb/testsuite/gdb.base/maint-info-inline-frames-and-blocks.exp
gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.base/miscexprs.exp
gdb/testsuite/gdb.base/multi-forks.exp
gdb/testsuite/gdb.base/nodebug.exp
gdb/testsuite/gdb.base/nofield.exp
gdb/testsuite/gdb.base/nostdlib.exp
gdb/testsuite/gdb.base/options.exp
gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp
gdb/testsuite/gdb.base/paginate-bg-execution.exp
gdb/testsuite/gdb.base/paginate-inferior-exit.exp
gdb/testsuite/gdb.base/patch.exp
gdb/testsuite/gdb.base/pc-not-saved.exp
gdb/testsuite/gdb.base/pie-fork.exp
gdb/testsuite/gdb.base/pointers.exp
gdb/testsuite/gdb.base/pr11022.exp
gdb/testsuite/gdb.base/print-symbol-loading.exp
gdb/testsuite/gdb.base/prologue.exp
gdb/testsuite/gdb.base/ptr-typedef.exp
gdb/testsuite/gdb.base/quit-live.exp
gdb/testsuite/gdb.base/random-signal.exp
gdb/testsuite/gdb.base/readline-ask.exp
gdb/testsuite/gdb.base/readline-commands-eof.exp
gdb/testsuite/gdb.base/relativedebug.exp
gdb/testsuite/gdb.base/remote.exp
gdb/testsuite/gdb.base/reread.exp
gdb/testsuite/gdb.base/restore.exp
gdb/testsuite/gdb.base/return2.exp
gdb/testsuite/gdb.base/run-attach-while-running.exp
gdb/testsuite/gdb.base/run-control-while-bg-execution.exp
gdb/testsuite/gdb.base/run-fail-twice.exp
gdb/testsuite/gdb.base/savedregs.exp
gdb/testsuite/gdb.base/sep.exp
gdb/testsuite/gdb.base/sepsymtab.exp
gdb/testsuite/gdb.base/set-cwd.exp
gdb/testsuite/gdb.base/set-inferior-tty.exp
gdb/testsuite/gdb.base/setshow.exp
gdb/testsuite/gdb.base/settings.exp
gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
gdb/testsuite/gdb.base/shlib-call.exp
gdb/testsuite/gdb.base/shlib-unload.exp
gdb/testsuite/gdb.base/shreloc.exp
gdb/testsuite/gdb.base/sigaltstack.exp
gdb/testsuite/gdb.base/sigchld.exp
gdb/testsuite/gdb.base/siginfo-obj.exp
gdb/testsuite/gdb.base/siginfo-thread.exp
gdb/testsuite/gdb.base/signals-state-child.exp
gdb/testsuite/gdb.base/signals.exp
gdb/testsuite/gdb.base/signull.exp
gdb/testsuite/gdb.base/sigrepeat.exp
gdb/testsuite/gdb.base/sigstep.exp
gdb/testsuite/gdb.base/so-impl-ld.exp
gdb/testsuite/gdb.base/solib-abort.exp
gdb/testsuite/gdb.base/solib-disc.exp
gdb/testsuite/gdb.base/solib-symbol.exp
gdb/testsuite/gdb.base/solib-weak.exp
gdb/testsuite/gdb.base/source-dir.exp
gdb/testsuite/gdb.base/stack-checking.exp
gdb/testsuite/gdb.base/startup-with-shell.exp
gdb/testsuite/gdb.base/step-over-no-symbols.exp
gdb/testsuite/gdb.base/step-sw-breakpoint-adjust-pc.exp
gdb/testsuite/gdb.base/step-test.exp
gdb/testsuite/gdb.base/style.exp
gdb/testsuite/gdb.base/sym-file.exp
gdb/testsuite/gdb.base/symtab-search-order.exp
gdb/testsuite/gdb.base/testenv.exp
gdb/testsuite/gdb.base/tls-dlobj.exp
gdb/testsuite/gdb.base/tls-multiobj.exp
gdb/testsuite/gdb.base/tls-nothreads.exp
gdb/testsuite/gdb.base/twice.exp
gdb/testsuite/gdb.base/type-opaque.exp
gdb/testsuite/gdb.base/unload.exp
gdb/testsuite/gdb.base/varargs.exp
gdb/testsuite/gdb.base/watch_thread_num.exp
gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
gdb/testsuite/gdb.base/watchpoint-running.exp
gdb/testsuite/gdb.base/watchpoint-solib.exp
gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
gdb/testsuite/gdb.base/watchpoints.exp
gdb/testsuite/gdb.base/with-mf.exp
gdb/testsuite/gdb.base/with.exp

index ecff42755256e812056620a8f371955b25d48f7d..280e89b3a44afddaf180b80312cdc0418712f948 100644 (file)
@@ -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] {
index 06dbec2b003d4afc12fe5031039abbe41f5598c6..744d8252b4b1fbf52a94989dfd16c3bd57913d57 100644 (file)
@@ -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
        }
index 7b62a750bf4abc7f88e16e6c8d8550a6cbbdb06f..36bfee2fa4b8af4260a1baf7eb068bc57f45ef3d 100644 (file)
@@ -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"
index 4fc221f59c4ad1a511f2fea61989701742f4daa2..757ce9231b285be73a36796f8e459d8478bab882 100644 (file)
@@ -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
index a69655d9ebe4a791ce437297b4fb2d02c379124b..aaee79623806e16a94918b4fbcf545aaf80af710 100644 (file)
@@ -33,7 +33,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     }
 
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 #
index 529002d7c10c1982aec5e9c18d574ac4254b8e81..5e5d73f3e3c082e2c0bb9dcb637221a20dd932d8 100644 (file)
@@ -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
index 2ce092d8b9d244bf8d4ac28dae225b1b00f2ac8b..c43a11c25a0f72753f67f941e1d9c20b51d34e59 100644 (file)
@@ -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.*" \
index 84c9bab472ed93418e2bb3e28aa7bbc525f2aa75..47e3d254ea58069466b01b32b6535d6856d90958 100644 (file)
@@ -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
index 0d1550a05414094f95100222ef6a9d6bccd83a7c..d0a29f2954d110724c8113c607f8b72e858f9045 100644 (file)
@@ -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'.
index 090d9ba54e114305f85d5f738169850c616dbcf7..38efa457cbfdd717cafecd24c2af38bf71df9a8f 100644 (file)
@@ -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"
 
index 8a23c9b213f859cda5c6fc174ddb37460f7dd0a0..7ad8ab926cd9767bbb9a88d7e2f3992dc55da6f5 100644 (file)
@@ -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" {
 
index 7781fe109800b9508969e32e30ef63ad7b9ef2c3..53d274fb719a15310f75d9632a70d2e42f2b1277 100644 (file)
@@ -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
index 18e20e03e01042e5204c4d4a77d2a64a551c0953..2e2a8e6d3fbdc2feeb6fad7d498af8ea0bf7c99a 100644 (file)
@@ -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
index d5580fb8e347e270cfa5d7d1549d413425dd4b29..e7bdf4935c93b2c3bae1a631302340fbb4938fe9 100644 (file)
@@ -33,7 +33,8 @@ proc test {continue_cmd} {
     global binfile
     global linenum
 
-    clean_restart $binfile
+    clean_restart
+    gdb_load $binfile
 
     if ![runto_main] {
        return
index 7727e482b824c8df4c58f50e1f3984b2dff195c0..f917eb82487cd9b27710df31e4e7b037210d55ad 100644 (file)
@@ -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"
 
index a99660a825bb62a0ffcc758ccf1966e93bcf7914..3e981dd92e1351f8522983d0ab3c9bcb5e6f000a 100644 (file)
@@ -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
index 4fc8f0676fb22ef7ba6b3dee2ec77ff2f27dc2bb..648992c7001b8989a47783a6aab211ddeb7ef776 100644 (file)
@@ -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]
index 4d03e7bc5fea712d7cf7c13a3a303bf690fd911d..53885227c70773db97e809b22b76517d5bdeb107 100644 (file)
@@ -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
index f0bdd168f696910f980e91ab27a55496e80ed9c8..371b9e73a31c9209b65bc2aacb9507d59828f0dd 100644 (file)
@@ -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
index c6c62699043d08c894820ef9a775a4b1c8c3b3c6..3ae5efe109f38c6d9ea97c1e8cba6653c7241c32 100644 (file)
@@ -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
index 06402dccff6f78ffa2c540642625a905592ed536..63428a1c93d2cae2715a2c5ddfd41c442e2a2bda 100644 (file)
@@ -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.
index 68f5ed413de96e6767aa8cc2fd9c5924410a4248..bbe2a5ab061d2cc2204a4d4d71de3a2a3b54cb65 100644 (file)
@@ -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 {
 
index 244eba87fef31838f8050fc0642b1327126db131..511e209a0605a2ad016efe4af53627d0da0ef06d 100644 (file)
@@ -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"
index 10a2928dc4aa965085c80add6300ad3bcf13422a..a74b8afdaa6960e42c9a0299fd23253f4df9e2d2 100644 (file)
@@ -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
index c250c6788c793159f5c04b3ed9b7dbb74b13bf65..e0ce899272b16ad58caac29831484196eea02d9b 100644 (file)
@@ -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
index f3ddef51dd7e90d77325bddfe8901cf74325c67b..9c5839c29918b1e45b01a02ac6ad8241c47b2c70 100644 (file)
@@ -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.
index 89b36f529e903ccc3e8066499bde4b969f51ba16..55eba5de68eab1d256c5d0f459c15778f43b3092 100644 (file)
@@ -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\\."
index a561689c12d355decc4eba3da7edec4f5cb7a193..dbc523d2caf2344ae682ac2fbbb0e6f8142aba8c 100644 (file)
@@ -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.*" \
index f078b972d9c570125f2c007db9a883fc8844cb46..c016d07bc4d2d6085d56d6e8d632b426c4babca0 100644 (file)
@@ -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
index 4288617bf73ccf55e7ffbb73693d03e1cef834a6..8af2ee69c2348a5d658131e78bd68060426f7af1 100644 (file)
@@ -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"
index e60fd16bc293db0822ff65d917f5e144c74dd7a2..20809378b02069fc2adb7812f96ee68935f7c3d4 100644 (file)
@@ -39,7 +39,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     }
 
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 if {![runto_main]} {
index dce162b77483658911a1f8027f597c319d1f660b..b4ea0f11754f626310447b807f9c715318579cc3 100644 (file)
@@ -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]} {
index 8f559458d3051cc9ad33bc43f394f6795263d520..dcc8d1b77909c6d5933cb55e057e79c6e53c8540 100644 (file)
@@ -34,7 +34,8 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 #
index 4764d72d3b25684928ceb34a9b29b9e726873099..8ba1f61fc2a054a1fb9a8af23fe17773651b056b 100644 (file)
@@ -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"
index 7c9647ce83b2fb39d557cf512b1c19ad6b4fa10c..23fd964955a242819991744adaab1dffc6bd3179 100644 (file)
@@ -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.
index 57c665e9e4c405ca0db69fdcb499e68b3b845324..94ab45478108d1d5e5baccbe2089bc36cd038166 100644 (file)
@@ -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" \
index fd8d1d1274caa48c7ecdf8cf78c232e53b7382d8..c34dfb5d9c27cae2360f15afe7479b692ac2fa14 100644 (file)
@@ -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:"
index d35ba1a129520c694e5311d9db1b573b95cfe863..39754600f1c18b7a8e2b2db4a9f5f1e1e9b8e283 100644 (file)
@@ -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 } {
index ef391d15049f3b1f853292b3d4c18113d6431f64..452850966527487930f16410d56890187aed2f77 100644 (file)
@@ -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
index efc42051eb70fc4576a3096c0122dda5054c3563..ae417ed38fef2ded56251c34a1043562c8457364 100644 (file)
@@ -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" {
index 60943f385adc7565180d642ea0eebed8f782b7a7..34c2adc7d84087a9d68fea6d80bb567253df491e 100644 (file)
@@ -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]
index f9f67a85c0dea556760de846a6109dc6ed96a2d5..c8d4350e86b75edccca1fe4c66da6ed716135d3d 100644 (file)
@@ -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"
index 2a6c377e1b8f76c22f7769b589295cc89f39ef33..11f75dac2835823cba7d29e5302c652fece352f2 100644 (file)
@@ -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
index 7aed6d52c2e2db1226ac6995fe654209b3d040ea..2fb6e0725bef7a6ac563ae0cc4549de8387c3388 100644 (file)
@@ -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
index bfce900c6a71cc16d6ce2cb77060a0fea76b8f4f..f3bdfb054d988d78d58082c7f20099fe9c142ac7 100644 (file)
@@ -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.
index 54fb4c4b4caab31863b466c1b68f88f26810823e..c4eb7cdfb223f50833adbda9e3491e05ffd75a05 100644 (file)
@@ -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
index 649784bc1da00038c4d8b764a57e4e422654fa34..11a831047169b0f9ecad2d20c4e1781746978185 100644 (file)
@@ -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
index dc3384bb162a1a8ea06aad53b179f6b10e2f03be..431037ceb19164d991d19c08af6db0b306f3321f 100644 (file)
@@ -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]
 
index 06be468891e297a3165259dc1b4dc3438f2ac31f..65de2d5e5e154ba1a5a48049ae63317df19cba9b 100644 (file)
@@ -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
index 9242a841199177df9e038c81807df42571027149..f28e9696ccb0dcc223f1bd8336fc18a5f90cc46c 100644 (file)
@@ -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
 
 #
index 0135b86a15981ff7ce31f11662842eb95f6f9948..262ccc19cf0935444652f90211902054a9e06b78 100644 (file)
@@ -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
index 24d4203fc61b9aa1b3145fa613b86a8c59c4b856..3b00f6d92ccb0051f51fde9ca3478c1fe37967b9 100644 (file)
@@ -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
 
index 32a72cc1068e96ea96d7909559edb6ba7d435a3f..e165bb44a65d8018d60e43c3a5a64ce5295e8db3 100644 (file)
@@ -27,7 +27,8 @@ proc dtrace_test {} {
         return -1
     }
 
-    clean_restart ${binfile}
+    clean_restart
+    gdb_load $binfile
     
     if ![runto_main] {
         return -1
index 7c84056dfa69cf2b78b6892736f6f51cadc9e8c7..64d897b09a2e0bb8911012c923392a8c8b761680 100644 (file)
@@ -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"
index b1003f28b4e9c6ba364ef1b3bd11efced67b810e..da5834be9a66625b439a83070bd04fef3ed15336 100644 (file)
@@ -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
index 5a4f524a809aef0417162a4d18ddb5274e2a9896..703f9e95c4f25f404eff2d477f7a688a37c5db88 100644 (file)
@@ -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"
 
index ff18214ab124c8174ffbe4883e01c3ae558cf8c9..ea1ff70498cca94b32f05e6be4f4091d8d72ce70 100644 (file)
@@ -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 } {
index 82c5fe0e855228742262f2d8ee60d4859f3f9b38..b4c856ed2e6828ca32b5b4964f38659f17b616e9 100644 (file)
@@ -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]} {
index 40a470f6c073e22c3722f0b35945fac8fb54f52d..2e375b4ed712471fa9b0267f7f7463156da10e8d 100644 (file)
@@ -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,
index 7ab446e63e2be15005ae8212045beb941aabe353..99f5e7df857321fe900baba6a1df933628f07370 100644 (file)
@@ -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
index 81f6f197cc44d07c34e45bccb712715dc0b17e57..ee0c198bf3d8197791760506154f6965b3f2e0f3 100644 (file)
@@ -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
index 7347c1160b1055425441800a07ac94effbd7f46b..a6b4c2391c72f4e4ba135185ff0a34196759041d 100644 (file)
@@ -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"
index ae686861c1511d008261f80177805bad206178af..3b2dfb0a6ea7a6969f2568f1dbfc0c1f7e23c4fc 100644 (file)
@@ -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.*" \
index 9a5c99637e6cb2189b402191a87cf71a7f27858b..305685135e0ad491e8668072c25f133ffe867a79 100644 (file)
@@ -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]} {
index 95b83af4119387dc7b02c14e1ec1b5c51196edf2..b8d3a6c738da9c4c10a3f0db5f03ea9e433d28ea 100644 (file)
@@ -30,7 +30,8 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 if {![runto_main]} {
     return
index 7138d04c39f7feb16bf76acc5a39b66f84635df3..1b39ed8a3fe75146d3f5e7e0956e7b7eddc9d651 100644 (file)
@@ -30,7 +30,8 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 if {![runto_main]} {
     return
index 2d47d5d2c203d7eb96ae7340e712d57a503adf90..cb49ef654d56cf125d7f7981d7108fb013026d0b 100644 (file)
@@ -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"
index 19ace001b08668138f156cb87bb23f2cf9190640..c24a9bc3389fb492cee7bd61bf2d36148baf5918 100644 (file)
@@ -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"
index 31e4d1587343d10abba4dc684bf228b3ec50d35a..0daa3aa3ef15b69f972a3edd72db808c58c330b3 100644 (file)
@@ -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
index 67bcd182194318e5efd8dd4f41f86641c8601160..b59404749a9f52294157eb85bf4501ede364303c 100644 (file)
@@ -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"
 
index fa00c359f18b9083a1d2d0280473a78a92def164..34ac668080acd353b9dbbbb152873d5ecaa96a17 100644 (file)
@@ -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
index ce617d5792bb1065feb8d2a14710ee72d39c2807..ec90179dee93bfd9ff3a5c3d912947c961e271fe 100644 (file)
@@ -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 } {
index 0fb79c733a2b7ba08c2a828404178985e24739ef..5a6bfe6c39d6f80b239c43d9ae0421ec05285a23 100644 (file)
@@ -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"
index 361fdb60d3d150ecdf8e34fbf7887414a77a9363..1f27a0b50797fb2ce2ec188e3a3970fea7b2679a 100644 (file)
@@ -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"
index 0090c37433e50fa424ba172ca1dba52f15af5ad0..2bbd06443bc75295d3abdca451821b4dbc5a9912 100644 (file)
@@ -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 .*" \
index c508b7832d9cac309ad24a7852515439d4cf64a5..1ad9b5547b18170b1d7265cdbf3943a26c26b60d 100644 (file)
@@ -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"
index 0a9f0991c0ddafa84d737f43f1f18016d11e956f..c8a4c11adc8c18316709a180d2c5507531e13e86 100644 (file)
@@ -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 } {
index 4e83c8cf41a5ae8cfd569a4ee2cf720d0e05c161..2cabbf0d7bc9f915085e9992c60d1dd53a2e0570 100644 (file)
@@ -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
index 648abd7fc39b99cd20c19ad4891f75da6a4e618b..ab12a28e5a9d92a71e169a91cceb9313125a2514 100644 (file)
@@ -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]} {
index 506ad11ba225ed5a36fa3308acc9ba20c356d7d2..9becaa14fe2b01d70872336be57f93014b1db637 100644 (file)
@@ -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 .*"
index 92d6c62c0397594918129a83d9d0ac85fd18c000..480396a1d7dd59b93f143ca6e37f253e5d9f8bbd 100644 (file)
@@ -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
 
index ac0bff3265f7544fb671a3c5e3365096a6ae9a55..62c20032dff917e3784155fe0a6d69cfdbbcd5ea 100644 (file)
@@ -40,7 +40,8 @@ if { [do_compile {-mcpu=native}] != ""
        return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 if { ![runto_main] } {
     return -1
index 9af144bd025e9d23d802a2c48a921d27efa084c5..8e815aee80d4b750b7eec5107bc078f37ec93d71 100644 (file)
@@ -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]
 
index 740f511b86c35fb119b12179acf1687c94506939..f12b4d109c9be2b5e0b030c3a075a2366c8c31ca 100644 (file)
@@ -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}]
 
index 2575c28b3d3442a464fc6a57429867c2530dd71d..508f7c98117ddeef0f6fbea1f203c8da3d419d4b 100644 (file)
@@ -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]
 
index 8598345a3f7bc9c0cdd277d57603a8590ad550e6..9355ce0ee0b1e9754693c3a5f6d4904ab2cd427a 100644 (file)
@@ -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]} {
index a7b6ccd3af09dfb2033b0a57a278346e2f280f21..1c774ce4e4c9dc34e9e7a34b4dc8a1cb2797a7c5 100644 (file)
@@ -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
index f75b6209c3600523694e8b7b8c4f7d582116142e..cb12964d073bc044898614fb8c59b40861a1730b 100644 (file)
@@ -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
index 33cc5b608d1022f73f227bfe594df6745d0a3622..b819284477107848707a063db11699d53389b8b5 100644 (file)
@@ -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
index e7aeac1ff1c4b7680dc766e8a1490857429c7451..594cb2be76541df838ddde0aa6650ab6c2e7a31f 100644 (file)
@@ -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] } {
index 3a11d7f108e69269f3d290f9d79fce74497c0132..fae36c2fc75b16ba1489de6d727e8f854c184310 100644 (file)
@@ -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"
index aa7dbc34f74978ecce8135979084c1ff92c149df..621a7b999aef77b29f00c8e10edd60b342a05d50 100644 (file)
@@ -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]} {
index dfa1215c504431529b9e3dd915e84fa86eb9198f..3887239ef3654e790af6406d2f2d33d64fd9d47d 100644 (file)
@@ -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"
 
index 764a88da8c2882084b8868b7407fadb6fa80ada2..9ba3a4c0bb8734874d7688d62cae089b581e4ad3 100644 (file)
@@ -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"
index 8dff6a5250f954329e9a57bb42e15091fdc7e5bb..adc889480e416eb1c6d07821527f24db3d227279 100644 (file)
@@ -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]"
index 39b594bf205fb10f23d458e1e75e8d572c8be849..09e99727ea79a28c6d4348c00d664b0129c2405c 100644 (file)
@@ -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]
 
index aa68bc969903910139f5ede1f9c224f683bb4646..c1afa184bb54631e1535dd94f3ea379c71059048 100644 (file)
@@ -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"
index 3c46f5d7ef27cc4839bfb86643dedd279d30f7a2..a42fc121bc644d1aeea4bcd53385abbb6f6ba339 100644 (file)
@@ -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.*" \
index 8b8c61d6fc9fe4a1747edc1366a6220595a7f96a..b909437b307577f17d9ba571af455b18d7adaf04 100644 (file)
@@ -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" ".*"
 
index ef6148b68b8f09e6353043846166cc04a9762702..e70f104408d41932e858a355d172541856cd3118 100644 (file)
@@ -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
index 77705eb079a9dff5716b884b959916eae4931fd1..55a274c08a6f0e12f822d83017149945c590a81c 100644 (file)
@@ -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
        }
index e1642348bfb422bd8e763dfc6395616309678dc3..290606ab5c35130bf4fa394589fb9feaa20125e1 100644 (file)
@@ -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]} {
index 919584d5991daee7834e8942980375fc6b3acd80..2b367e4bd7eb15802b62ec53a00ce360c8cfbd4b 100644 (file)
@@ -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
index b84b7d69564f8571b1c4229ccc45e3d1e434ae6b..aa8d8e00cfa180154345d1bab58f9519bf4d1e24 100644 (file)
@@ -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...
 
index cfd2ba7d27b87ba601d69011711d5ec5970a2c1f..2382fa534d8d7f5d80fd3a626a4697ea36541aab 100644 (file)
@@ -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.
index 78072065506271364cb4389d6b23d3c9845f36d4..196a1f209dc166a32ddd3a1fdfa3c58e61425aec 100644 (file)
@@ -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
index d005ceb59a8ca0ea23fe286c4b89a4c84f279ead..bdbb52ba0cfc39389e9704318414cf13111f4d1a 100644 (file)
@@ -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
        }
index 31007e8dfadd414a9a6c1ec4d99cfdf6cfda5a06..b00d6d58c7ddd40ee7de7d66ba57a6922342c111 100644 (file)
@@ -32,7 +32,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 #
index 38ba03e7578858f4e536d1bd44df0e845ee1691f..4fbb75735507dc93abc9cc68b5b5318264b74252 100644 (file)
@@ -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 
index caf0d5cbce50bef7f1f908fa789717c3581a26d9..99552e6baef7426c93283fa055824b991d012fe3 100644 (file)
@@ -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$"
index 0b5f86337c1ca7847e2a8693c07d53c41b1c4048..63f1356efc3a46842fa106e425a07b192dab0e3e 100644 (file)
@@ -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
index 80f2d01aad23467f875cd2afbcdd1ed3977b69f5..91d03792a3e77d8b02c8f68c59303d7816a51a55 100644 (file)
@@ -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.
index 7936e5353fe7d32f3c20f8189e755eb719147093..3d49b36a862d1fa825fbc0d61eecc5a7f5a678c1 100644 (file)
@@ -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"  \
index 86196fa5dc80e200e7997cdf887c0fe2ad5e682f..f723d751bd0017bd6575438abbab2eb83c198660 100644 (file)
@@ -44,7 +44,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [lis
     return -1
 }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 #
index 3facccb6315c08ccc27daaeebc40967a8f04355c..5d2d22009bc11d1a0355ae4a84f53b8833cc047f 100644 (file)
@@ -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
index 2d0a5a926260aca71a4ced6f8dfbcc62d2767946..b839317d00a8b0bf14ed4f84d657911da942a56a 100644 (file)
@@ -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.,
index 2e88725dbe8e84df505f388f8b153daf327d3804..31d0234c91f3338210c7e1cfab82ea7243c4e079 100644 (file)
@@ -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}"
index ecf09a8d64fd0f885409762a44ac04ec745c9163..8dcefcf276ec1be90a38797fdf6616211521cffd 100644 (file)
@@ -49,7 +49,8 @@ foreach_with_prefix pie { "nopie" "pie" } {
        return -1
     }
 
-    clean_restart $binfile
+    clean_restart
+    gdb_load $binfile
 
     gdb_breakpoint "*marker"
 
index a0947e2f6f4be3903266575af562bd2faae35795..8ac9f4ee755182f17292efeea450cf6d86c2344f 100644 (file)
@@ -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
index a831050551c19a687021d81ea952fb67939040ad..d60a0ea9e6df6924d8422a5694de4485b9f3fb51 100644 (file)
@@ -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
index dfd78237270ffdeec557584ed86a47e7dbc09f30..40f98fc6a29030f46a279e63cf9f013b2d26d51e 100644 (file)
@@ -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
index 76176e2cfc79d7650ef47b0aeb39ad63767ab282..6cc992bb7f87ee542020db18e56897c491cbaecd 100644 (file)
@@ -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
index 69e5581cbe7ae5e52f52e140e4d21de048833669..f6abc597c4944792b37e7bfe472fd45eca7c47f8 100644 (file)
@@ -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
index 16e11bc46f709e785ef64ffdccba981e06870ceb..e761e9355f392181f39c3a41720b3d9c3a779e38 100644 (file)
@@ -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.
index 86407b4adad3fee641003f9f1df06a3a86a96e0a..9d232c83592747bd9a81739934876e1fec1d4180 100644 (file)
@@ -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
index ab021813ffec81b5f1cd863c4925fc8438d528aa..4d4d58ed881697e50e43ee13546c25fb8b2b2b11 100644 (file)
@@ -32,7 +32,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
      return -1
     }
 
-clean_restart ${binfile}
+clean_restart
+gdb_load $binfile
 
 
 #
index e7bfba0596b2b71305a2d43e1b8a3a4647a84e67..70a7d8b059181e9a0276c9d78e8719680e8983d4 100644 (file)
@@ -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
index c9e24808f59dcfc243a14974e56f7c6dcc7e6e0c..91e818b179d7b6563d373a72eef5f26e2f8431f5 100644 (file)
@@ -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
        }
index 0d3902d7bbd07b84899bab31e688f1379c2608d5..736e7798a9add0a8ab05b128e915a4e84f718cc7 100644 (file)
@@ -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
index 53d03cc0341be3b592c7b14dc6ef7f09646e91ba..8bffb26336a6fa4f7c978419483c10d86213859d 100644 (file)
@@ -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"
index a95c980aa908d627096c2ca54fd4b009a61eda3f..46579d4d4f30c4cc040d0a4171a9a2122a5e3a5e 100644 (file)
@@ -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
     }
index bb5b482166d67fd9dc66af01af3f7451e1144106..16f94676b19cf77ffa4e1c7d542fcb6748516372 100644 (file)
@@ -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]
index 2948970b7061362526c256fa0d6659bd56ce33b3..0fdfc7661ce14458e5c7596e1643b4041c5b0694 100644 (file)
@@ -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."
index 021e40f3700c6b2ac59af317c9db3d8651b1df4e..d55dd1d1f568a1fd32b3377217cb6fcfc3ec85e1 100644 (file)
@@ -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
 
index d7137718b6327d0cef3a9ee45c7fd460157c6de6..2465ffdc503513b3f9925fd8be100e7cfe7351f3 100644 (file)
@@ -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
 
index 9917faf89b249453ad0671d204f85f3de12e7e0a..c1d6a99ba0b0952a8f040af19efc79202283b1f5 100644 (file)
@@ -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.
index 7e7d2c89f86624345a60c21acf881169b29d399a..6c71f40dc79ed56fa85ca22c0705e6011c3c1ebf 100644 (file)
@@ -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" \
index 9724032e4598a02667369b7a0bd16e1c372a51cd..5448fb42e67b3672d6f21bf37098775e9b97fd73 100644 (file)
@@ -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
 }
index b657c117348f82546cba4053924943ab9caf2eef..e90a60b1da768dd578fdf3d0aec23c14dadef7f8 100644 (file)
@@ -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
index ae1388d79a99488343b7600f3d546303716a592f..7b40a5f493a5a9a63ac7f2bc6d073c8fa3b0bc49 100644 (file)
@@ -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] } {
index eaee0101a901c0f010f6d4518bf7b56c35021d04..2c75d06b84df953abba4cfbf68742ab145be5794 100644 (file)
@@ -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.
index af8c61b14841c19b89dfd1b48b7c4d3eb594b6ad..07cbddae1cfd6a747afff316d38017194cc11aa9 100644 (file)
@@ -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"
 
index 2c44566267c1c6cce2538e26929f2998519ea19f..d71d8720f2c29b7d9e65c517044d81bfe671c004 100644 (file)
@@ -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]} {
index 5a1e07732f27f987ed5dfbe4a2d5ebef4cca5c1d..6abf35649616786e4879800320a7559c690b8b13 100644 (file)
@@ -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" {
index f5e8705c29e126a7b4435e7eee6cd585df427da2..ed7a7a23f8283539d253329a2b5fb0f4c0491a33 100644 (file)
@@ -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]
index 72a2632d690a556777e39ba1bb89f355b49ac46f..73a200f713d52b73360221fcb7305a62beeebb54 100644 (file)
@@ -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
index 64ec57b1822ac26ab455dc7bf9413e486b0bd594..c9b0a96b1bd55947029dd0ce3a22bd8a420c55af 100644 (file)
@@ -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" \
index 79ff913b7237063debd93508183e617b03ed1d9c..0e38a9d8279410d5ca30c822afc4004e549f4046 100644 (file)
@@ -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
index 5e7cc243457a04694791f9986b6390951e0286b3..d83023b6816a055c1a8d4e54d0c0a11b39c8254c 100644 (file)
@@ -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.
index 920f435d77d0b2671d0de3f7210a54812ff0f234..aa4b300ad3421734deecac0021b702e0c8ae492c 100644 (file)
@@ -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"
index 6a5f6d81ea8d94d855cab396719d074d55980187..d3ff1c3374c52392e8f6cddf31b09d301cb4efcc 100644 (file)
@@ -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
index 9d47416fa705aae38db14e150892a162ba60e462..0e1369eda4f4f78b232f64e0815359475ba3819d 100644 (file)
@@ -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
index 8ab64a8071e0ff6106a23e1c427c75cfad7c53ad..2bd79affcc53807d7aa58a205e878e8cc3e15acd 100644 (file)
@@ -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
 
index 978ddebe24ae5b35d527dad515cb75ef594ccabd..47013a0f8369b44ca37a15be428f719fe38ca04f 100644 (file)
@@ -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"
index 51d41c3755b837e52086bd6dadf8b8000058acf0..40112417460f2a5c2008700f5067a54576156bf7 100644 (file)
@@ -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
 
index d63febb28dd65c158547e2e68009f1c93e5390a8..52f714001250aca0127ec5696a2db65ddaefad51 100644 (file)
@@ -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]"
index bf0d58cdba626e8ed5b2f718e28464c10df6abdb..270b4e15e91dca4a9ea83b51eba03b35070060b0 100644 (file)
@@ -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]"
index 608951f70cdd5ccd45a3624a0819cc74c804a9cc..00ad7f5183459f56281cdd4adef38642ec22ee6c 100644 (file)
@@ -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
index d3113610761769ae2e1d412506d60331b373314f..5ff1e381dfe89ae4b0371611cc8c92fdb7a263bf 100644 (file)
@@ -58,7 +58,8 @@ proc test_handle_all_print {} {
 }
 test_handle_all_print
 
-clean_restart $binfile
+clean_restart
+gdb_load $binfile
 
 if {[runto_main]} {
 
index 478e471ba8c0b473d234bae28ddef3bb6314ac63..9ad772ffeb735f522b46b56b48838da4a6dfc26e 100644 (file)
@@ -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.
index 9afa3467f99800043d00ab8047d424cb5bfb4813..8fa92af5177507e2230a910fb94df62e7ca47587 100644 (file)
@@ -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]} {
index b49105cf07ee06ae4cfb6de087097096b62d64a4..2df5dd0c27c433fa9fcb88e9396784607b593265 100644 (file)
@@ -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"
 
index d5c4143ac8fbef622cf5d4dcb17a5aa44fa6fda9..1e309e53654a703d587a0a4a14808e1081e6eadb 100644 (file)
@@ -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.
index 2f6d636646b401fcb0eddfd1a5f37043e73d7250..ab162a9d41652b091c6107e309a94a0bdb33d3d2 100644 (file)
@@ -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
index ba7dcce767c215ccc74070d5193bd74bd24b53d7..880f632c96378e7c1ba3463eb9237a7fe609e3fb 100644 (file)
@@ -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]} {
index f3ca61296dc253f9fdd42e5a392b6ed27cf3227e..4d3494cbc6744a9f4efed35e00429f51e67668f5 100644 (file)
@@ -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.
index 2d75a91d6d3e8d3f665255e4a60fa8181430dce5..511ef37277128173bd22c9aeb6efc299facc3cae 100644 (file)
@@ -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
 
index 3b0c5dd2b06379059cf3dc88cf8b0ef694edb80c..e07a1177455bf3672678a355d577f1ccc96de87e 100644 (file)
@@ -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"
index 5e55b435f6e6cc2da0a4e23dbec3bb007715988d..15fc677dda187abef5b8c7132a38a6ea461ad9ea 100644 (file)
@@ -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
index 9c016b47c1f1f1ef4bd6e9cc21dd2ebc4e195dca..25b161ad4f15f8f4fb8f3ea2857b954891ea8fef 100644 (file)
@@ -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"
index 2eb8efea005d32b502793c775a22936cacd20381..1a919864d434f8a3554faac3da450201a648107a 100644 (file)
@@ -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
index 2dc67ea3139b6de9d5eac87ff21f121c03a89346..2dde3bbece7cab11edc592251994cdc3b00aceae 100644 (file)
@@ -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"
index 28eccf75cc4dbd3f2fe025e5ddb02722066f09ec..39833a30fd8d5a298d7ee3ec6e32b2e40d2968eb 100644 (file)
@@ -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
index 6b1b08e9d5effc0fee51e533380dce0412c6c3da..3dde79af323c5c8b2f2d846e1c181af87f6b56d5 100644 (file)
@@ -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 {
index 8197c0e30ca1fbc207b2246cc099ec37b170bab1..6570fdb7a3b461ea0804f7246c9f2ee593a21adf 100644 (file)
@@ -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
index cf0d5070e74a260eca705475c6700abf370ee86b..34b1db02ce9b2906b47a237b73c017a1ed5518d4 100644 (file)
@@ -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] {
index beb59d2d7ad2c342b576cf4f1fcc176dcb2bc4e9..fb7a584bd464599681d03e287152cd2fa5c7ee94 100644 (file)
@@ -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
 
index 32e869e129684cdc3c999ffee0f258fed2c863ae..1509ec8d445c58f2b0b87db451b55c3263dc0469 100644 (file)
@@ -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 } {
index 2a52610dbf8935db8edf79fff15ce6758d2c7fd1..eb3721ee4a059dd2a810e241db4a4be3c7ff8310 100644 (file)
@@ -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 } {
index 105e68642d7c534600f9e640e50c28112f624bc0..0be78a2b6f5a3165a8ab785891a30ef1715ad6e2 100644 (file)
@@ -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 } {
index 6f49c462850000bc2826b756f84da3e071862b3a..995cd4d027a3a8aaea7320ead124c8bc9f2b4265 100644 (file)
@@ -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
index da060b99d886dccccc24433c0796742310f6727a..f5d8582924fa0ee038ed1547289dac67c9f6b6c4 100644 (file)
@@ -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]} {
index 0761f270ebb77212020350b3bc01b0d17a2d05e5..b2d848d55da96433b0333422a22f1d86bd95f068 100644 (file)
@@ -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
 
index a34a57868ae1f163401424899c736f2b76508cdc..534971c6f5f724e51c3c6547ef49e358a84acd5e 100644 (file)
@@ -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"
index 4a5c1c2d9e9000bd1d03dff767c86c499c45c269..e1b54c0e4fbc87aa6b28c8e3456be60de1ac2bb1 100644 (file)
@@ -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
index fa63edb935d82095deb8deb28d5725d47a59b6a6..afdb82e69b9785df22e964716830688276fc0f0e 100644 (file)
@@ -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"
 
index 1a5f9c3a23de5a6677c60427fb5263cedcf81f80..04c4c5273dfb61a4bde88b4439062492ffaf1314 100644 (file)
@@ -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"
index 28b8d084fc17816486a3991a63fe450a7a3e8f6e..7f58a83b3d971ddc25b695169110142507e32756 100644 (file)
@@ -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
index 2bedcaa5d6f8d14ec2e4184357362c0d95fe4eeb..163ec3bdee7597f5da66182ab8df00b591234f06 100644 (file)
@@ -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
index 37baa5e31b660b154d1d0373b0b6b2286eb16437..d8e4d63a57c0caf9f15089068ed10197151b83f3 100644 (file)
@@ -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} {
index 564d5d7c67549686a55b418def20ae4b439c359d..3ac5e1d8a38e15506bd89561e40ec349fedb4123 100644 (file)
@@ -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\\)"
index a9b4a6c9475002003e0ecb5f1e17a03d52e5d27d..d766e5d3b8f490e46efc3d53b3b15377687cf8f4 100644 (file)
@@ -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