[gdb/testsuite] Minimize gdb restarts
authorTom de Vries <tdevries@suse.de>
Sat, 25 Sep 2021 07:28:57 +0000 (09:28 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 25 Sep 2021 07:28:57 +0000 (09:28 +0200)
commit98bf5c02cfe9d13428a55c0da8d5f150d7c1fc54
treedd14355db3a17a81c81669abf4ad792fb733615e
parent99d0d99649c12b2bdccaeb788d5d0f0d0dff4d5d
[gdb/testsuite] Minimize gdb restarts

Minimize gdb restarts, applying the following rules:
- don't use prepare_for_testing unless necessary
- don't use clean_restart unless necessary

Also, if possible, replace build_for_executable + clean_restart
with prepare_for_testing for brevity.

Touches 68 test-cases.

Tested on x86_64-linux.
68 files changed:
gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
gdb/testsuite/gdb.base/access-mem-running.exp
gdb/testsuite/gdb.base/attach-pie-noexec.exp
gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp
gdb/testsuite/gdb.base/bt-selected-frame.exp
gdb/testsuite/gdb.base/catch-syscall.exp
gdb/testsuite/gdb.base/condbreak.exp
gdb/testsuite/gdb.base/cvexpr.exp
gdb/testsuite/gdb.base/dprintf-bp-same-addr.exp
gdb/testsuite/gdb.base/dprintf-detach.exp
gdb/testsuite/gdb.base/duplicate-bp.exp
gdb/testsuite/gdb.base/fork-print-inferior-events.exp
gdb/testsuite/gdb.base/frameapply.exp
gdb/testsuite/gdb.base/gcore-relro-pie.exp
gdb/testsuite/gdb.base/gcore-tls-pie.exp
gdb/testsuite/gdb.base/index-cache.exp
gdb/testsuite/gdb.base/info_minsym.exp
gdb/testsuite/gdb.base/info_qt.exp
gdb/testsuite/gdb.base/killed-outside.exp
gdb/testsuite/gdb.base/list.exp
gdb/testsuite/gdb.base/many-headers.exp
gdb/testsuite/gdb.base/msym-lang.exp
gdb/testsuite/gdb.base/noreturn-finish.exp
gdb/testsuite/gdb.base/noreturn-return.exp
gdb/testsuite/gdb.base/pie-fork.exp
gdb/testsuite/gdb.base/random-signal.exp
gdb/testsuite/gdb.base/reread-readsym.exp
gdb/testsuite/gdb.base/share-env-with-gdbserver.exp
gdb/testsuite/gdb.base/stack-protector.exp
gdb/testsuite/gdb.base/startup-with-shell.exp
gdb/testsuite/gdb.base/step-over-exit.exp
gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
gdb/testsuite/gdb.base/whatis.exp
gdb/testsuite/gdb.cp/cplusfuncs.exp
gdb/testsuite/gdb.cp/rvalue-ref-params.exp
gdb/testsuite/gdb.cp/static-typedef-print.exp
gdb/testsuite/gdb.cp/typedef-base.exp
gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
gdb/testsuite/gdb.fortran/array-slices.exp
gdb/testsuite/gdb.fortran/nested-funcs-2.exp
gdb/testsuite/gdb.fortran/subarray.exp
gdb/testsuite/gdb.gdb/unittest.exp
gdb/testsuite/gdb.mi/mi-fortran-modules.exp
gdb/testsuite/gdb.mi/mi-info-sources.exp
gdb/testsuite/gdb.mi/mi-linespec-err-cp.exp
gdb/testsuite/gdb.mi/mi-sym-info.exp
gdb/testsuite/gdb.multi/info-threads.exp
gdb/testsuite/gdb.multi/multi-arch.exp
gdb/testsuite/gdb.multi/multi-re-run.exp
gdb/testsuite/gdb.multi/run-only-second-inf.exp
gdb/testsuite/gdb.multi/tids-gid-reset.exp
gdb/testsuite/gdb.multi/tids.exp
gdb/testsuite/gdb.python/py-infthread.exp
gdb/testsuite/gdb.server/connect-stopped-target.exp
gdb/testsuite/gdb.server/exit-multiple-threads.exp
gdb/testsuite/gdb.server/run-without-local-binary.exp
gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
gdb/testsuite/gdb.threads/break-while-running.exp
gdb/testsuite/gdb.threads/clone-attach-detach.exp
gdb/testsuite/gdb.threads/next-bp-other-thread.exp
gdb/testsuite/gdb.threads/signal-sigtrap.exp
gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
gdb/testsuite/gdb.threads/tid-reuse.exp
gdb/testsuite/gdb.trace/qtro.exp