From 1f2c4bb4b100d8f18e7505ca9ae9b3e1398933fd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 8 Jan 2023 13:57:19 -0700 Subject: [PATCH] Consolidate calls to require The previous transforms left some files with multiple calls to "require" near the top. This patch consolidates these to the extent possible. (There are a couple of files that call "require" later, after running some tests. These have been left alone.) --- gdb/testsuite/gdb.ada/catch_ex_std.exp | 4 +--- gdb/testsuite/gdb.ada/dynamic-iface.exp | 4 +--- gdb/testsuite/gdb.ada/exec_changed.exp | 4 +--- gdb/testsuite/gdb.ada/interface.exp | 4 +--- gdb/testsuite/gdb.ada/iwide.exp | 4 +--- gdb/testsuite/gdb.ada/mi_interface.exp | 4 +--- gdb/testsuite/gdb.ada/start.exp | 4 +--- gdb/testsuite/gdb.ada/tagged.exp | 4 +--- gdb/testsuite/gdb.ada/tagged_access.exp | 4 +--- gdb/testsuite/gdb.ada/task_watch.exp | 4 +--- gdb/testsuite/gdb.base/async-shell.exp | 4 +--- gdb/testsuite/gdb.base/fork-print-inferior-events.exp | 4 +--- gdb/testsuite/gdb.base/solib-display.exp | 4 +--- gdb/testsuite/gdb.base/solib-nodir.exp | 10 ++++------ gdb/testsuite/gdb.base/sym-file.exp | 4 +--- gdb/testsuite/gdb.base/watchpoint-hw-attach.exp | 4 +--- gdb/testsuite/gdb.base/watchpoint-hw.exp | 4 +--- gdb/testsuite/gdb.btrace/multi-inferior.exp | 4 +--- gdb/testsuite/gdb.btrace/reconnect.exp | 3 +-- gdb/testsuite/gdb.cp/annota2.exp | 10 ++++------ gdb/testsuite/gdb.cp/annota3.exp | 10 ++++------ gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-common-block.exp | 5 ++--- gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp | 7 +++---- gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp | 7 +++---- gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp | 4 +--- .../gdb.dwarf2/dw2-out-of-range-end-of-seq.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-ranges.exp | 4 +--- .../gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp | 4 +--- .../gdb.dwarf2/dw2-vendor-extended-opcode.exp | 4 +--- .../gdb.dwarf2/frame-inlined-in-outer-frame.exp | 6 ++---- gdb/testsuite/gdb.dwarf2/implptrconst.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implptrpiece.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-array.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-const.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-global.exp | 4 +--- gdb/testsuite/gdb.dwarf2/implref-struct.exp | 4 +--- gdb/testsuite/gdb.dwarf2/imported-unit.exp | 4 +--- .../gdb.dwarf2/locexpr-data-member-location.exp | 6 ++---- gdb/testsuite/gdb.dwarf2/main-subprogram.exp | 4 +--- gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp | 4 +--- gdb/testsuite/gdb.dwarf2/method-ptr.exp | 4 +--- gdb/testsuite/gdb.dwarf2/missing-sig-type.exp | 4 +--- gdb/testsuite/gdb.dwarf2/nostaticblock.exp | 4 +--- gdb/testsuite/gdb.dwarf2/staticvirtual.exp | 4 +--- gdb/testsuite/gdb.dwarf2/subrange.exp | 4 +--- gdb/testsuite/gdb.fortran/debug-expr.exp | 4 +--- gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 4 +--- gdb/testsuite/gdb.mi/mi-async.exp | 5 +---- gdb/testsuite/gdb.mi/user-selected-context-sync.exp | 7 +++---- gdb/testsuite/gdb.multi/attach-no-multi-process.exp | 4 +--- gdb/testsuite/gdb.multi/watchpoint-multi.exp | 4 +--- gdb/testsuite/gdb.server/attach-flag.exp | 4 +--- gdb/testsuite/gdb.server/ext-attach.exp | 4 +--- gdb/testsuite/gdb.trace/change-loc.exp | 4 +--- gdb/testsuite/gdb.trace/ftrace-lock.exp | 5 ++--- gdb/testsuite/gdb.trace/ftrace.exp | 4 +--- gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 3 +-- gdb/testsuite/gdb.trace/pending.exp | 4 +--- gdb/testsuite/gdb.trace/trace-condition.exp | 4 +--- gdb/testsuite/gdb.trace/trace-enable-disable.exp | 5 ++--- 75 files changed, 95 insertions(+), 238 deletions(-) diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp index 73cbdaf90ca..c7b65098208 100644 --- a/gdb/testsuite/gdb.ada/catch_ex_std.exp +++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp @@ -13,12 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require allow_shlib_tests +require allow_shlib_tests allow_ada_tests load_lib "ada.exp" -require allow_ada_tests - standard_ada_testfile foo set srcfile2 [file join [file dirname $srcfile] some_package.adb] diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp index 431fa29d64f..b523968194a 100644 --- a/gdb/testsuite/gdb.ada/dynamic-iface.exp +++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile main diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index 9e69d136e31..087d1ac9b3d 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -15,11 +15,9 @@ load_lib "ada.exp" -require allow_ada_tests - # This testcase verifies the behavior of the `start' command, which # does not work when we use the gdb stub... -require !use_gdb_stub +require allow_ada_tests !use_gdb_stub standard_ada_testfile first diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp index aa1abc78d38..151fbbee44f 100644 --- a/gdb/testsuite/gdb.ada/interface.exp +++ b/gdb/testsuite/gdb.ada/interface.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile foo diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp index 8915852e4e3..33a46d18327 100644 --- a/gdb/testsuite/gdb.ada/iwide.exp +++ b/gdb/testsuite/gdb.ada/iwide.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile p diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp index ed1215a3922..80594a8762f 100644 --- a/gdb/testsuite/gdb.ada/mi_interface.exp +++ b/gdb/testsuite/gdb.ada/mi_interface.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile foo diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp index 20870652266..026a57933af 100644 --- a/gdb/testsuite/gdb.ada/start.exp +++ b/gdb/testsuite/gdb.ada/start.exp @@ -15,11 +15,9 @@ load_lib "ada.exp" -require allow_ada_tests - # This testcase verifies the behavior of the `start' command, which # does not work when we use the gdb stub... -require !use_gdb_stub +require allow_ada_tests !use_gdb_stub standard_ada_testfile dummy diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp index f45a6509da5..a842ed2b6ba 100644 --- a/gdb/testsuite/gdb.ada/tagged.exp +++ b/gdb/testsuite/gdb.ada/tagged.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile foo diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp index 438858ffb96..dcd969c4722 100644 --- a/gdb/testsuite/gdb.ada/tagged_access.exp +++ b/gdb/testsuite/gdb.ada/tagged_access.exp @@ -15,9 +15,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require gnat_runtime_has_debug_info +require allow_ada_tests gnat_runtime_has_debug_info standard_ada_testfile p diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp index 0641008fb51..02b4f1cb0bb 100644 --- a/gdb/testsuite/gdb.ada/task_watch.exp +++ b/gdb/testsuite/gdb.ada/task_watch.exp @@ -17,9 +17,7 @@ load_lib "ada.exp" -require allow_ada_tests - -require allow_hw_watchpoint_tests +require allow_ada_tests allow_hw_watchpoint_tests standard_ada_testfile foo diff --git a/gdb/testsuite/gdb.base/async-shell.exp b/gdb/testsuite/gdb.base/async-shell.exp index fb56d2602b1..970f44da21c 100644 --- a/gdb/testsuite/gdb.base/async-shell.exp +++ b/gdb/testsuite/gdb.base/async-shell.exp @@ -15,10 +15,8 @@ standard_testfile -require support_displaced_stepping - # The testfile uses "run". The real bug happened only for ![is_remote target]. -require !use_gdb_stub +require support_displaced_stepping !use_gdb_stub save_vars { GDBFLAGS } { set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\"" diff --git a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp index 33ac172c53b..436471dd7f1 100644 --- a/gdb/testsuite/gdb.base/fork-print-inferior-events.exp +++ b/gdb/testsuite/gdb.base/fork-print-inferior-events.exp @@ -20,11 +20,9 @@ # 'set detach-on-fork [on,off]' are the correct ones. # This test relies on "run", so it cannot run on target remote stubs. -require !use_gdb_stub - # Test relies on checking follow-fork output. Do not run if gdb debug is # enabled as it will be redirected to the log. -require !gdb_debug_enabled +require !use_gdb_stub !gdb_debug_enabled standard_testfile diff --git a/gdb/testsuite/gdb.base/solib-display.exp b/gdb/testsuite/gdb.base/solib-display.exp index aaaa134007b..913203ecfb9 100644 --- a/gdb/testsuite/gdb.base/solib-display.exp +++ b/gdb/testsuite/gdb.base/solib-display.exp @@ -28,8 +28,6 @@ # (and thus aren't affected by shared library unloading) are not # disabled prematurely. -require allow_shlib_tests - # This test is currently not supported for stub targets, because it uses the # start command (through gdb_start_cmd). In theory, it could be changed to # use something else (kill + gdb_run_cmd with a manual breakpoint at main). @@ -43,7 +41,7 @@ require allow_shlib_tests # This is because the initial stop is done before the shared libraries are # loaded. -require !use_gdb_stub +require allow_shlib_tests !use_gdb_stub # Library file. set libname "solib-display-lib" diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp index dd0724909ad..f5d94798f9d 100644 --- a/gdb/testsuite/gdb.base/solib-nodir.exp +++ b/gdb/testsuite/gdb.base/solib-nodir.exp @@ -13,18 +13,16 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . */ -require allow_shlib_tests +# We need to be able to influence the target's environment and working +# directory. Can't do that if when we connect the inferior is already +# running. +require allow_shlib_tests !use_gdb_stub # The testcase assumes the target can access the OBJDIR. if [is_remote target] { return } -# We need to be able to influence the target's environment and working -# directory. Can't do that if when we connect the inferior is already -# running. -require !use_gdb_stub - set testfile "solib-nodir" # Arbitrary file, possibly not containing main, even an empty one. set srclibfile foo.c diff --git a/gdb/testsuite/gdb.base/sym-file.exp b/gdb/testsuite/gdb.base/sym-file.exp index cb5204ecff0..1c95f05a286 100644 --- a/gdb/testsuite/gdb.base/sym-file.exp +++ b/gdb/testsuite/gdb.base/sym-file.exp @@ -29,9 +29,7 @@ # 13) Check that the execution can continue without error. # 14) Regression test for a stale breakpoints bug. -require is_elf_target - -require allow_shlib_tests +require is_elf_target allow_shlib_tests set target_size TARGET_UNKNOWN if {[is_lp64_target]} { diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp index 785fc35f7bc..4ddb7a76602 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp @@ -16,9 +16,7 @@ # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used # when attaching to a target. -require allow_hw_watchpoint_tests - -require can_spawn_for_attach +require allow_hw_watchpoint_tests can_spawn_for_attach standard_testfile diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp index 13871912d09..e24544f8e42 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp @@ -13,9 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !use_gdb_stub - -require allow_hw_watchpoint_tests +require !use_gdb_stub allow_hw_watchpoint_tests standard_testfile diff --git a/gdb/testsuite/gdb.btrace/multi-inferior.exp b/gdb/testsuite/gdb.btrace/multi-inferior.exp index 79e5a1c39bf..49bdfe18a63 100644 --- a/gdb/testsuite/gdb.btrace/multi-inferior.exp +++ b/gdb/testsuite/gdb.btrace/multi-inferior.exp @@ -22,9 +22,7 @@ # # Each inferior can be recorded separately. -require allow_btrace_tests - -require !use_gdb_stub +require allow_btrace_tests !use_gdb_stub standard_testfile if [prepare_for_testing "failed to prepare" $testfile {} {debug}] { diff --git a/gdb/testsuite/gdb.btrace/reconnect.exp b/gdb/testsuite/gdb.btrace/reconnect.exp index 2c8358327a4..09de4ca2710 100644 --- a/gdb/testsuite/gdb.btrace/reconnect.exp +++ b/gdb/testsuite/gdb.btrace/reconnect.exp @@ -19,8 +19,7 @@ load_lib gdbserver-support.exp -require allow_btrace_tests -require allow_gdbserver_tests +require allow_btrace_tests allow_gdbserver_tests standard_testfile if [prepare_for_testing "failed to prepare" $testfile $srcfile] { diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index 64adbbdb220..d5a74d003ce 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -20,7 +20,10 @@ # test running programs # -require allow_cplus_tests +# This testcase cannot use runto_main because of the different prompt +# we get when using annotation level 2. +# +require allow_cplus_tests target_can_use_run_cmd standard_testfile .cc @@ -29,11 +32,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ return -1 } -# This testcase cannot use runto_main because of the different prompt -# we get when using annotation level 2. -# -require target_can_use_run_cmd - set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n" set frames_invalid "\r\n\032\032frames-invalid\r\n" diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index 788bda77f3d..965dcac0d80 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -20,7 +20,10 @@ # test running programs # -require allow_cplus_tests +# This testcase cannot use runto_main because of the different prompt +# we get when using annotation level 2. +# +require allow_cplus_tests target_can_use_run_cmd standard_testfile .cc @@ -29,11 +32,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ return -1 } -# This testcase cannot use runto_main because of the different prompt -# we get when using annotation level 2. -# -require target_can_use_run_cmd - # # line number where we need to stop in main # diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp index b24500b8301..c24e8dbf5b6 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp index 7ac4ecb8600..0fa58f11d22 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp @@ -16,15 +16,14 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +# It requires fortran. +require dwarf2_support allow_fortran_tests # This test can only be run on x86-64 targets. if {![istarget x86_64-*] || ![is_lp64_target]} { return 0 } -# It requires fortran. -require allow_fortran_tests standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp index 032aec86731..5213f461476 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp @@ -16,12 +16,11 @@ # Check that GDB can call C++ functions whose parameters or return values have # type containing a static member of the same type. -# Still no C++ compiler is used. -require allow_cplus_tests - load_lib dwarf.exp + +# Still no C++ compiler is used. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support standard_testfile .S -main.c diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp index 2fae105cbc8..80e19fa0c10 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp @@ -25,10 +25,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc # Reuse many of the test source files from dw2-inline-header-1.exp. standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp index 2494489549f..43fd46dcbcc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp @@ -53,10 +53,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc # Prepare and run the test. proc do_test { start_label func_name tag } { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp index bbc14d4a2f6..e0990c5d144 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp @@ -48,10 +48,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp index 682778479cb..bd445c511e5 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp @@ -37,10 +37,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp index 29598cb02e7..d338b96210a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp @@ -26,10 +26,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp index fcde45f80a2..47167b664bc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp @@ -27,10 +27,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile -lbls.c .S \ .c .h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp index d3dc4484073..f1c021605a6 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp @@ -26,10 +26,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp index d149efdca1c..1b3d083e8fc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp @@ -26,10 +26,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp index 79e6de789aa..f1a18ef1dfd 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp @@ -26,10 +26,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp index 68696f0b634..3a88cfe9187 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp @@ -15,10 +15,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp index 6cad9c32d61..e16490fa484 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp @@ -16,12 +16,11 @@ # Check that GDB can call C++ functions whose parameters or return values have # type containing a static member of the same type. -# Still no C++ compiler is used. -require allow_cplus_tests - load_lib dwarf.exp + +# Still no C++ compiler is used. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support standard_testfile .S set executable ${testfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp index 888a20c23c5..978750f439f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp @@ -19,10 +19,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp index c0a33b95b65..cd4d0406762 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp @@ -19,10 +19,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp index 147e943361e..bd0a02c786f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp @@ -18,10 +18,8 @@ load_lib dwarf.exp # DW_AT_high_pc but with DW_AT_ranges instead. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp index c3a1261d133..2e5369c48a8 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp @@ -17,9 +17,7 @@ load_lib dwarf.exp # Test DW_AT_ranges in the context of a subprogram scope. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc proc do_test {suffix} { global gdb_test_file_name diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp index b9466eecd3b..bfbd1cd90c4 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp @@ -22,10 +22,8 @@ load_lib dwarf.exp # instead. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp index 75c6b874fc9..0795bd5accc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp @@ -18,9 +18,7 @@ load_lib dwarf.exp # Test that psymbols are made when DW_AT_ranges is used. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile main.c .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp index 7845ea6a22a..8af77d1039b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp @@ -18,10 +18,8 @@ load_lib dwarf.exp # DW_AT_high_pc but with DW_AT_ranges instead. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -2.c -3.c set asmfile [standard_output_file ${testfile}.s] diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp index a02e670c5b5..00dc9d52043 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp @@ -28,10 +28,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp index be925887c05..37deefced8e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp @@ -15,10 +15,8 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - # The .c files use __attribute__. -require is_c_compiler_gcc +require dwarf2_support is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp index 95093c8529c..b819202ff5a 100644 --- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp +++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp @@ -25,12 +25,10 @@ # Because of (1), the test has to be written in assembly with explicit CFI # directives. -# Check if starti command is supported. -require !use_gdb_stub - load_lib dwarf.exp -require dwarf2_support +# Check if starti command is supported. +require !use_gdb_stub dwarf2_support standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp index 109fa4bdade..57fb6c19d3d 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrconst.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrconst.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp index e6cd728d088..22dc3b596a5 100644 --- a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp +++ b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp @@ -16,9 +16,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp index 8ab51b627ef..0857c756ac8 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-array.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp @@ -16,12 +16,10 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global array whose location is a DW_OP_addr. -require allow_cplus_tests - load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support # We'll place the output of Dwarf::assemble in implref-array.S. standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/implref-const.exp b/gdb/testsuite/gdb.dwarf2/implref-const.exp index 19c6a8d8775..49c4ec93a43 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-const.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp @@ -16,12 +16,10 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a DW_AT_const_value. -require allow_cplus_tests - load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support # We'll place the output of Dwarf::assemble in implref-const.S. standard_testfile main.c .S diff --git a/gdb/testsuite/gdb.dwarf2/implref-global.exp b/gdb/testsuite/gdb.dwarf2/implref-global.exp index f0f1cd70048..9347181966b 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-global.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp @@ -16,12 +16,10 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global variable whose location is a DW_OP_addr. -require allow_cplus_tests - load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support # We'll place the output of Dwarf::assemble in implref-global.S. standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/implref-struct.exp b/gdb/testsuite/gdb.dwarf2/implref-struct.exp index 83427688d3e..a46a52227d6 100644 --- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp +++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp @@ -16,12 +16,10 @@ # Test a C++ reference marked with DW_OP_GNU_implicit_pointer. # The referenced value is a global struct whose location is a DW_OP_addr. -require allow_cplus_tests - load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support # We'll place the output of Dwarf::assemble in implref-struct.S. standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp index 7e28931be22..f515283d629 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp @@ -22,12 +22,10 @@ # on specific compiler versions or use of optimization switches, in # this case -flto. -require allow_cplus_tests - load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_cplus_tests dwarf2_support standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp index a5b301e26fb..beb72aaf5ca 100644 --- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp +++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp @@ -48,13 +48,11 @@ # Therefore, due to #2 above, this test case creates debug info # which is then used by a shared object. -# This test can't be run on targets lacking shared library support. -require allow_shlib_tests - load_lib dwarf.exp +# This test can't be run on targets lacking shared library support. # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support +require allow_shlib_tests dwarf2_support # gdb_test_file_name is the name of this file without the .exp # extension. Use it to form basenames for the main program diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp index 23f02df8513..544f2a5200d 100644 --- a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp +++ b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-4 and use gas. -require dwarf2_support - -require !use_gdb_stub +require dwarf2_support !use_gdb_stub standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp index 9afad943d1c..ab546019f83 100644 --- a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp +++ b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile .S diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp index 1bcbbb44e94..a34814c78fd 100644 --- a/gdb/testsuite/gdb.dwarf2/method-ptr.exp +++ b/gdb/testsuite/gdb.dwarf2/method-ptr.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile .cc -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp index 22370de3d71..cc9f27fe810 100644 --- a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp +++ b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile main.c -dw4.S diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp index 945bc335fd4..2676cf351b4 100644 --- a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp +++ b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile main.c .S diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp index 96466e7afe5..8ca7510dab0 100644 --- a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp +++ b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp index 72d7babc88e..8f3d24943ec 100644 --- a/gdb/testsuite/gdb.dwarf2/subrange.exp +++ b/gdb/testsuite/gdb.dwarf2/subrange.exp @@ -15,9 +15,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. -require dwarf2_support - -require allow_cplus_tests +require dwarf2_support allow_cplus_tests standard_testfile method-ptr.cc -dw.S diff --git a/gdb/testsuite/gdb.fortran/debug-expr.exp b/gdb/testsuite/gdb.fortran/debug-expr.exp index cb141f5758e..9d8a915ffe7 100644 --- a/gdb/testsuite/gdb.fortran/debug-expr.exp +++ b/gdb/testsuite/gdb.fortran/debug-expr.exp @@ -15,11 +15,9 @@ # Test "set debug expr 1" on Fortran expressions. -require allow_fortran_tests - # Test relies on checking gdb debug output. Do not run if gdb debug is # enabled as any debug will be redirected to the log. -require !gdb_debug_enabled +require allow_fortran_tests !gdb_debug_enabled standard_testfile .f90 load_lib fortran.exp diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp index 27224b5f96f..7b1fb0015a3 100644 --- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp +++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp @@ -21,7 +21,7 @@ set MIFLAGS "-i=mi" standard_testfile # Support for XML is needed to run this test. -require allow_xml_test +require allow_xml_test can_spawn_for_attach if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested "failed to compile" @@ -32,8 +32,6 @@ if [mi_gdb_start] { return } -require can_spawn_for_attach - set string_re {(?:[^\\"]|\\.)*} set id_re "id=\"$decimal\"" diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp index 5ca7c5dccc3..7104ca0dcf6 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -21,14 +21,11 @@ # mi_run_cmd, it ignores whatever target the rest of GDB testsuite is # using, and always tries to run natively. So, don't do anything unless # we're actually testing native. -require isnative +require isnative !use_gdb_stub if {![istarget *-linux*]} { return } -# Check if start command is supported. -require !use_gdb_stub - # The plan is for async mode to become the default but toggle for now. set saved_gdbflags $GDBFLAGS set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""] diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp index 91ca9b16bf8..fb43b69aa74 100644 --- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp +++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp @@ -30,15 +30,14 @@ # are using all-stop, or running, if we are using non-stop. # Do not run if gdb debug is enabled as it doesn't work for separate-mi-tty. -require !gdb_debug_enabled +# Multiple inferiors are needed, therefore only native gdb and extended +# gdbserver modes are supported. +require !use_gdb_stub !gdb_debug_enabled load_lib mi-support.exp standard_testfile -# Multiple inferiors are needed, therefore only native gdb and extended -# gdbserver modes are supported. -require !use_gdb_stub set compile_options "debug pthreads" if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} { diff --git a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp index 1ef7984078a..e364f87db03 100644 --- a/gdb/testsuite/gdb.multi/attach-no-multi-process.exp +++ b/gdb/testsuite/gdb.multi/attach-no-multi-process.exp @@ -22,9 +22,7 @@ load_lib gdbserver-support.exp standard_testfile -require allow_gdbserver_tests - -require can_spawn_for_attach +require allow_gdbserver_tests can_spawn_for_attach if {[build_executable "build" $testfile $srcfile {debug}] == -1} { return -1 diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp index 109defa864a..a0c413702a5 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp @@ -18,11 +18,9 @@ set executable ${testfile} # Multiple inferiors are needed, therefore both native and extended gdbserver # modes are supported. Only non-extended gdbserver is not supported. -require !use_gdb_stub - # Do not use simple hardware watchpoints ("watch") as its false hit may be # unnoticed by GDB if it reads it still has the same value. -require allow_hw_watchpoint_access_tests +require !use_gdb_stub allow_hw_watchpoint_access_tests if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.server/attach-flag.exp b/gdb/testsuite/gdb.server/attach-flag.exp index ad67303a7dd..67d55ed0d97 100644 --- a/gdb/testsuite/gdb.server/attach-flag.exp +++ b/gdb/testsuite/gdb.server/attach-flag.exp @@ -21,9 +21,7 @@ load_lib gdbserver-support.exp standard_testfile -require allow_gdbserver_tests - -require can_spawn_for_attach +require allow_gdbserver_tests can_spawn_for_attach # Start the test program, attach to it using gdbserver's --attach flag, connect # to it with GDB, check that what we see makes sense. diff --git a/gdb/testsuite/gdb.server/ext-attach.exp b/gdb/testsuite/gdb.server/ext-attach.exp index f7092b0340c..4d3e39ad66c 100644 --- a/gdb/testsuite/gdb.server/ext-attach.exp +++ b/gdb/testsuite/gdb.server/ext-attach.exp @@ -22,9 +22,7 @@ load_lib trace-support.exp standard_testfile -require allow_gdbserver_tests - -require can_spawn_for_attach +require allow_gdbserver_tests can_spawn_for_attach if {[build_executable "failed to prepare" $testfile $srcfile debug]} { return -1 diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp index 4c4f54d89be..cbc72955716 100644 --- a/gdb/testsuite/gdb.trace/change-loc.exp +++ b/gdb/testsuite/gdb.trace/change-loc.exp @@ -14,9 +14,7 @@ load_lib "trace-support.exp" -require allow_shlib_tests - -require gdb_trace_common_supports_arch +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set libfile1 "change-loc-1" diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp index b795d6d4011..90fcd15f7a8 100644 --- a/gdb/testsuite/gdb.trace/ftrace-lock.exp +++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp @@ -14,7 +14,8 @@ load_lib "trace-support.exp" -require allow_shlib_tests +# Check that the target supports trace. +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set executable $testfile @@ -30,8 +31,6 @@ set additional_flags [gdb_target_symbol_prefix_flags] set options [list debug [gdb_target_symbol_prefix_flags] \ additional_flags=-DNUM_THREADS=$NUM_THREADS] -# Check that the target supports trace. -require gdb_trace_common_supports_arch if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index 1e38bd7bc1b..f57da4aef9b 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -14,7 +14,7 @@ load_lib "trace-support.exp" -require allow_shlib_tests +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set executable $testfile @@ -23,8 +23,6 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -require gdb_trace_common_supports_arch - if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug $additional_flags]] { return -1 diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp index cdd28cb6f96..30c4ff4876f 100644 --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp @@ -15,8 +15,7 @@ load_lib trace-support.exp -require allow_shlib_tests -require gdb_trace_common_supports_arch +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile pending.c set libfile1 "pendshr1" diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index 76d28652820..bc93b8bb097 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -14,9 +14,7 @@ load_lib "trace-support.exp" -require allow_shlib_tests - -require gdb_trace_common_supports_arch +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set libfile1 "pendshr1" diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp index 32ebf5a376a..6c42bcb4cc5 100644 --- a/gdb/testsuite/gdb.trace/trace-condition.exp +++ b/gdb/testsuite/gdb.trace/trace-condition.exp @@ -14,7 +14,7 @@ load_lib "trace-support.exp" -require allow_shlib_tests +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set executable $testfile @@ -23,8 +23,6 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -require gdb_trace_common_supports_arch - if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug $additional_flags]] { return -1 diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp index 184d2758b5e..4358eb08c5a 100644 --- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp +++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp @@ -14,7 +14,8 @@ load_lib "trace-support.exp" -require allow_shlib_tests +# Check that the target supports trace. +require allow_shlib_tests gdb_trace_common_supports_arch standard_testfile set executable $testfile @@ -23,8 +24,6 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set options [list debug [gdb_target_symbol_prefix_flags]] -# Check that the target supports trace. -require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { untested "failed to compile" return -1