aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-12-13 15:21:57 -0700
committerTom Tromey <tom@tromey.com>2023-01-13 13:18:55 -0700
commitce8d533e88bea858ad96011683469d182a22e355 (patch)
treee14bab1e0495a9d6bd99b8cd671790385ca97c52 /gdb/testsuite
parentade3e4f5b154f983dddff333edd8dd7445955b67 (diff)
downloadfsf-binutils-gdb-ce8d533e88bea858ad96011683469d182a22e355.zip
fsf-binutils-gdb-ce8d533e88bea858ad96011683469d182a22e355.tar.gz
fsf-binutils-gdb-ce8d533e88bea858ad96011683469d182a22e355.tar.bz2
Use require dwarf2_support
This changes some tests to use "require dwarf2_support".
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.base/until-trailing-insns.exp5
-rw-r--r--gdb/testsuite/gdb.compile/compile-ops.exp4
-rw-r--r--gdb/testsuite/gdb.cp/incomplete-type-overload.exp2
-rw-r--r--gdb/testsuite/gdb.cp/namelessclass.exp4
-rw-r--r--gdb/testsuite/gdb.cp/nsalias.exp4
-rw-r--r--gdb/testsuite/gdb.dlang/circular.exp7
-rw-r--r--gdb/testsuite/gdb.dlang/watch-loc.exp7
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-cold-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-stride.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/arr-subrange.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/atomic-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/bad-regnum.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/callframecfa.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/calling-convention.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/clang-debug-names.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/clztest.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/corrupt.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/count.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/data-loc.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/debug-names.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dup-psym.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-align.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-basic.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-common-block.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-compressed.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-const.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-error.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-filename.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-icycle.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-intercu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-intermix.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-noloc.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-call.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-param-error.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-producer.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ranges.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restrict.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-strp.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp5
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwz.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwzbuildid.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dwznolink.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/enum-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-base.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-loclists.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-mix.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fission-reread.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/formdata16.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/fortran-var-string.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/gdb-add-index.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/gdb-index.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr-64bit.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrconst.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implptrpiece.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implref-array.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implref-const.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implref-global.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/implref-struct.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/imported-unit-c.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/imported-unit.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/intbits.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/loclists-start-end.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/mac-fileno.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/macro-source-path.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/main-subprogram.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/method-ptr.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/missing-sig-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/missing-type-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/multidictionary.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/nonvar-access.exp2
-rw-r--r--gdb/testsuite/gdb.dwarf2/nostaticblock.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/pieces.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr11465.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/pr13961.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/shortpiece.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/staticvirtual.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/struct-decl.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/struct-with-sig.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/subrange-enum.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/subrange.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/symtab-producer.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/trace-crash.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/typeddwarf.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/utf-rust.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/valop.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/var-access.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/variant.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/varval.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/void-type.exp4
-rw-r--r--gdb/testsuite/gdb.dwarf2/watch-notconst.exp4
-rw-r--r--gdb/testsuite/gdb.linespec/break-asm-file.exp4
-rw-r--r--gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-reg-undefined.exp4
-rw-r--r--gdb/testsuite/gdb.trace/entry-values.exp4
-rw-r--r--gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp4
215 files changed, 215 insertions, 661 deletions
diff --git a/gdb/testsuite/gdb.base/until-trailing-insns.exp b/gdb/testsuite/gdb.base/until-trailing-insns.exp
index a68ea995..0038692 100644
--- a/gdb/testsuite/gdb.base/until-trailing-insns.exp
+++ b/gdb/testsuite/gdb.base/until-trailing-insns.exp
@@ -79,10 +79,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- unsupported "dwarf2 support required for this test"
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp
index 0cc8411..3935d47 100644
--- a/gdb/testsuite/gdb.compile/compile-ops.exp
+++ b/gdb/testsuite/gdb.compile/compile-ops.exp
@@ -20,9 +20,7 @@ load_lib compile-support.exp
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dbg.S
diff --git a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
index db7b06e..a2b60e5 100644
--- a/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
+++ b/gdb/testsuite/gdb.cp/incomplete-type-overload.exp
@@ -22,7 +22,7 @@ load_lib dwarf.exp
if { [skip_cplus_tests] } { return }
-if { ![dwarf2_support] } { return }
+require dwarf2_support
standard_testfile .cc .S
set asm_file [standard_output_file ${srcfile2}]
diff --git a/gdb/testsuite/gdb.cp/namelessclass.exp b/gdb/testsuite/gdb.cp/namelessclass.exp
index 40e71d0..bf4748c 100644
--- a/gdb/testsuite/gdb.cp/namelessclass.exp
+++ b/gdb/testsuite/gdb.cp/namelessclass.exp
@@ -24,9 +24,7 @@ if {[skip_cplus_tests]} {
}
# This test can only be run on x86-like targets which support DWARF.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
return 0
diff --git a/gdb/testsuite/gdb.cp/nsalias.exp b/gdb/testsuite/gdb.cp/nsalias.exp
index 18abdbe..19a36b8 100644
--- a/gdb/testsuite/gdb.cp/nsalias.exp
+++ b/gdb/testsuite/gdb.cp/nsalias.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if {[skip_cplus_tests]} {
return
diff --git a/gdb/testsuite/gdb.dlang/circular.exp b/gdb/testsuite/gdb.dlang/circular.exp
index 102e1b8..e2b0b8a 100644
--- a/gdb/testsuite/gdb.dlang/circular.exp
+++ b/gdb/testsuite/gdb.dlang/circular.exp
@@ -18,12 +18,7 @@
load_lib "d-support.exp"
load_lib "dwarf.exp"
-if { [skip_d_tests] } { continue }
-
-# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require !skip_d_tests dwarf2_support
standard_testfile circular.c circular-dw.S
diff --git a/gdb/testsuite/gdb.dlang/watch-loc.exp b/gdb/testsuite/gdb.dlang/watch-loc.exp
index 8aaf79d..4b240b1 100644
--- a/gdb/testsuite/gdb.dlang/watch-loc.exp
+++ b/gdb/testsuite/gdb.dlang/watch-loc.exp
@@ -18,12 +18,7 @@
load_lib "d-support.exp"
load_lib "dwarf.exp"
-if { [skip_d_tests] } { return -1 }
-
-# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require !skip_d_tests dwarf2_support
standard_testfile watch-loc.c watch-loc-dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
index 9ca63ba..a01cdfe 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-cold-name.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile ada-linkage-name.c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
index 18f7325..e805220 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-linkage-name.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
index 729ade9..d340fa5 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-thick-pointer.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
index cc4c903..89e1f76 100644
--- a/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/ada-valprint-error.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/arr-stride.exp b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
index d572c03..ea03651 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-stride.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-stride.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp b/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
index 9f9abdc..d5d9041 100644
--- a/gdb/testsuite/gdb.dwarf2/arr-subrange.exp
+++ b/gdb/testsuite/gdb.dwarf2/arr-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/atomic-type.exp b/gdb/testsuite/gdb.dwarf2/atomic-type.exp
index 10e9621..7e5a32a 100644
--- a/gdb/testsuite/gdb.dwarf2/atomic-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/atomic-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
index c564d48..de9905e 100644
--- a/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
+++ b/gdb/testsuite/gdb.dwarf2/bad-regnum.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
index df675c7..a1e4d97 100644
--- a/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/callframecfa.exp b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
index 85830a4..4242e08 100644
--- a/gdb/testsuite/gdb.dwarf2/callframecfa.exp
+++ b/gdb/testsuite/gdb.dwarf2/callframecfa.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Test DW_OP_call_frame_cfa.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 targets.
if {![is_x86_like_target]} {
return 0
diff --git a/gdb/testsuite/gdb.dwarf2/calling-convention.exp b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
index 0002001..4a3c0a5 100644
--- a/gdb/testsuite/gdb.dwarf2/calling-convention.exp
+++ b/gdb/testsuite/gdb.dwarf2/calling-convention.exp
@@ -27,9 +27,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
index a83638a..a24112a 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-cli-macro.exp
@@ -23,9 +23,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
index 8a2a2bd..7bc46ce 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names-2.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -debug.S -foo.c
diff --git a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
index dde52e4..d6ee18b 100644
--- a/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/clang-debug-names.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/clztest.exp b/gdb/testsuite/gdb.dwarf2/clztest.exp
index f089b94..75dfb15 100644
--- a/gdb/testsuite/gdb.dwarf2/clztest.exp
+++ b/gdb/testsuite/gdb.dwarf2/clztest.exp
@@ -19,9 +19,7 @@ standard_testfile .S
set test "clztest"
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
index a19986a..ba8c272 100644
--- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
+++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
@@ -21,9 +21,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/corrupt.exp b/gdb/testsuite/gdb.dwarf2/corrupt.exp
index a7822f8..5966cfb 100644
--- a/gdb/testsuite/gdb.dwarf2/corrupt.exp
+++ b/gdb/testsuite/gdb.dwarf2/corrupt.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/count.exp b/gdb/testsuite/gdb.dwarf2/count.exp
index ffff96b..0f13fb3 100644
--- a/gdb/testsuite/gdb.dwarf2/count.exp
+++ b/gdb/testsuite/gdb.dwarf2/count.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# Only run on targets which support dwarf and gas.
-if { ![dwarf2_support] } {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
index cc207ec..1caae93 100644
--- a/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/cpp-linkage-name.exp
@@ -21,9 +21,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
index 0cdc9e0..b2ce802 100644
--- a/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
+++ b/gdb/testsuite/gdb.dwarf2/cu-no-addrs.exp
@@ -19,9 +19,7 @@
load_lib "dwarf.exp"
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c cu-no-addrs.S
diff --git a/gdb/testsuite/gdb.dwarf2/data-loc.exp b/gdb/testsuite/gdb.dwarf2/data-loc.exp
index 475de31..4ab29ec 100644
--- a/gdb/testsuite/gdb.dwarf2/data-loc.exp
+++ b/gdb/testsuite/gdb.dwarf2/data-loc.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
index 187eb57..4e8ce14 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-aranges-duplicate-offset-warning.exp
@@ -17,10 +17,7 @@ load_lib dwarf.exp
# Test with two aranges entries referring to the same CU.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
index bdee91e..adb302e 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-bad-cu-index.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile _start.c debug-names.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
index 0f26497..ca57ecb 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-duplicate-cu.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile _start.c debug-names.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
index 90e1afb..5af32c8 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-missing-cu.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile _start.c debug-names.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp b/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
index 7830e2f..d866a3c 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names-non-ascending-cu.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile _start.c debug-names.S
diff --git a/gdb/testsuite/gdb.dwarf2/debug-names.exp b/gdb/testsuite/gdb.dwarf2/debug-names.exp
index e7a032e..f718de7 100644
--- a/gdb/testsuite/gdb.dwarf2/debug-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/debug-names.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile _start.c debug-names.S
diff --git a/gdb/testsuite/gdb.dwarf2/dup-psym.exp b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
index 4d470f3..cf7892a 100644
--- a/gdb/testsuite/gdb.dwarf2/dup-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dup-psym.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Minimal DWARF-2 unit test
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
index 397cb38..2ec3d11 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-abs-hi-pc.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
index 7d67f9c..78a3443 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-align.exp b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
index aa54d48..c3e1edd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-align.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-align.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.exp
index c4985e0..9626686 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if {[skip_cplus_tests]} { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
index 71cedcb..50a229f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Minimal DWARF-2 unit test
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
index cfc3cff..185d96c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-elf.exp
@@ -30,9 +30,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -other.S -dwarf.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
index d8c6041..802103d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
index 990a377..3d2c164 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
index 6b3b4a7..f4a349d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bad-unresolved.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -2.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
index 9020e40..9f3a05e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Minimal DWARF-2 unit test
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
index bb66fe7..79058ca 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-bfloat16.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
index c98ee2a..97674ef 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
index 3070c38..43dec8d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
index b56c279..58e1ecc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-common-block.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
index 6012d0f..a68307a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
index dec6873..1e87f67 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Minimal DWARF-2 unit test
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-const.exp b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
index e8e1619..80eb5ff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-const.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
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 5c2ebde..f0baf76b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp
@@ -21,9 +21,7 @@ if { [skip_cplus_tests] } { continue }
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S -main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
index 23b66a7..e559f52 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
# in the length of the CU. */
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
index 977e541..2f37d4d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test has hard-wired assumptions that host and build filenames are
# the same, and assumes POSIX pathname syntax.
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 d931b28..5a92fdf 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp
@@ -25,9 +25,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
index 37da078..58792e1 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dos-drive.exp
@@ -14,9 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
index 3654dba..01c5d1c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# introduced by GCC PR debug/40659.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
index 4e5a50c..ec7522d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
index f9b1abb..262b972 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dup-frame.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86_64 targets.
if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
index d9a51f3..99c6a00 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Test G++ 4.1 producing DW_TAG_namespace with DW_AT_name "::".
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
index 57b1567..d154a93 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
index 187ad8a..7252502 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-entry-value.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [prepare_for_testing "failed to prepare" "dw2-entry-value" {dw2-entry-value-main.c dw2-entry-value.S} {nodebug}] } {
return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
index 9337892..0980f43 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
index 579b68d..3bdac4c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Note: Inspired from dw2-basic.exp.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
index b172ef5..2838179 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-fixed-point.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile dw2-fixed-point.c dw2-fixed-point-dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
index 357717d..36925da 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
# This is GDB PR symtab/13277.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
index b07070f..5f719d4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-icycle.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
index cb84bc1..6529eff 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
index 2e24614..1c0ab5d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# introduced by GCC PR debug/40659.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
index 53d905d..bdd7070 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86_64 targets.
if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
index bc64c8a..3293d61 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp
@@ -53,9 +53,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
index 7325ec6..5caa9cc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp
@@ -48,9 +48,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
index ca18231..b98d600 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp
@@ -37,9 +37,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
index 7c33f43..9f50077 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
index 886b9cb..cf81c0f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S -main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
index 9731185..c3120a2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp
@@ -27,9 +27,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
index addb6f3..87c70a4 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
index 14b2709..fb1c560 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-with-lexical-scope.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
# This test can only be run on targets that support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
index 2cea30f..f5e5f80 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Minimal DWARF-2 unit test
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
index dae8ea3..03d18cc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Intermixed 32-bit and 64-bit DWARF format tests.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
index 904befe..7e9151d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
index dd949a9..74faf11 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
index e696b49..ac0f4d3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-lexical-block-bare.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.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 0f9d3df..2b47377 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp
@@ -15,10 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
index dec2790..510631c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp
@@ -21,9 +21,7 @@ if { [skip_cplus_tests] } { continue }
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require 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 1e22e25..317ea21 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,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
index 4aedfc5..8e3f151 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-minsym-in-cu.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This testfile has reproducibility only with cc-with-index.sh.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
index 92353ca..8f8dac6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
@@ -21,9 +21,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
index 3a1818d..a76d965 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
index c13e502..5ee799b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
index e7769e0..b10050f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-noloc.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [prepare_for_testing "failed to prepare" "dw2-noloc" {dw2-noloc-main.c dw2-noloc.S} {nodebug}] } {
return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
index 2589b76..dd461c3 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
index 500eb03..c1de099 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Test DW_OP_call2 and DW_OP_call4, PR gdb/10640.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
index ce02834..535e74d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
set test "dw2-op-out-param"
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
index a3fcd68..17ccb64 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
index 7298097..ae6c58f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp
@@ -24,9 +24,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .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 03b1346..5e44bad 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,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
index 683349d..3d1fe89 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S -main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
index 12944a8..ad45bbd 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
index 3ab12cd..0cbdaa0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-prologue-end.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
index 58d62f9..6fd837c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp
@@ -18,10 +18,7 @@ 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.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
index 8aefbc9..7db7cd2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp
@@ -17,10 +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.
-if {![dwarf2_support]} {
- unsupported "dwarf2 support required for this test"
- return 0
-}
+require dwarf2_support
if ![is_c_compiler_gcc] {
unsupported "gcc required for this test"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
index f656050..bb92d7e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp
@@ -22,10 +22,7 @@ load_lib dwarf.exp
# instead.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
index 032e0c8..79da50d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym-warning.exp
@@ -18,10 +18,7 @@ load_lib dwarf.exp
# Check psymtabs addrmaps generated from DW_AT_ranges of functions.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- unsupported "dwarf2 support required for this test"
- return 0
-}
+require dwarf2_support
standard_testfile -main.c .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
index d82f700..e195969 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp
@@ -18,10 +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.
-if {![dwarf2_support]} {
- unsupported "dwarf2 support required for this test"
- return 0
-}
+require dwarf2_support
if ![is_c_compiler_gcc] {
unsupported "gcc required for this test"
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
index 2fff9ad..de272c8 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp
@@ -18,10 +18,7 @@ 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.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
index 5a722b7..d9a552a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S -func.c -main.c
lassign [function_range func_nofb \
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
index 1dfde9f..06dd4dc 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-reg-undefined.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86_64 targets.
if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
index 574e4c4..a525882 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# in DWARF. clang-3.5.0-9.fc22.x86_64 produced it inside DW_AT_location.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
index 93a38ad..d51cb8e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
index 5dd4707..083c802 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
index 0ecf22d..dfb5313 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-single-line-discriminators.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
index 7a1f3a4..966de06 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp
@@ -32,9 +32,7 @@ load_lib dwarf.exp
# end of main func_end
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
index 7befe1c..a3b9dd0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_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 11092f9..5073611 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,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
index a853782..2bbd664 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-strp.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# are unreferenced in code, and whose contents appear in .debug_str.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
index cac6e14..9d81155 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-symtab-includes.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
index 0181a61..e532c4c 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
standard_testfile .S
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
index 95d7645..9f6a4ac 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unresolved.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
index a353395..5fa6ee5 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -foo.c dwz.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
index 531ebcd..b94f5c9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unusual-field-names.exp
@@ -30,9 +30,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
set asm_file [standard_output_file $srcfile2]
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
index f11d529..e921c10 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp
@@ -20,9 +20,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
index 64aacd8..2b4fd0e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S main.c
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
index 19aaea9..c5a59f0 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp
@@ -15,10 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
# The .c files use __attribute__.
if ![is_c_compiler_gcc] {
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
index 2cedd02..63e75fb 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-weird-type-len.exp
@@ -23,9 +23,7 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 6309360..733116f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -19,10 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- verbose "Skipping $gdb_test_file_name."
- return 0
-}
+require dwarf2_support
if {[skip_shlib_tests]} {
return 0
diff --git a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
index c6dc98e..92df97e 100644
--- a/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/dwz.exp b/gdb/testsuite/gdb.dwarf2/dwz.exp
index 26819b2..f0cf51c 100644
--- a/gdb/testsuite/gdb.dwarf2/dwz.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwz.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c dwz.S
diff --git a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
index 0bb2325..48fc619 100644
--- a/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwzbuildid.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# No remote host testing either.
if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dwznolink.exp b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
index cdd95f3..a03bff2 100644
--- a/gdb/testsuite/gdb.dwarf2/dwznolink.exp
+++ b/gdb/testsuite/gdb.dwarf2/dwznolink.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# No remote host testing either.
if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
index 49064eb..88fd331 100644
--- a/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
+++ b/gdb/testsuite/gdb.dwarf2/dyn-type-unallocated.exp
@@ -34,9 +34,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp b/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
index 90f6478..6e4a331 100644
--- a/gdb/testsuite/gdb.dwarf2/dynarr-ptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/dynarr-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
index 89aaf46..658a9a4 100644
--- a/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
+++ b/gdb/testsuite/gdb.dwarf2/enqueued-cu-base-addr.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-};
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/enum-type.exp b/gdb/testsuite/gdb.dwarf2/enum-type.exp
index b91aaa9..4c14c55 100644
--- a/gdb/testsuite/gdb.dwarf2/enum-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/enum-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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
index ddb407c..6f1d07d 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-absolute-dwo.exp
@@ -21,9 +21,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
index 5f1d58b..c3338c2 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
index 9ee16af..c13450d 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists-pie.exp
@@ -26,9 +26,7 @@ if [is_remote host] {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
index 5ac723f..31c7bca 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-loclists.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/fission-mix.exp b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
index 223eab9..a396747 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-mix.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-mix.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
standard_testfile .c -2.c
set objfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
index 104aba1..7bdf627 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-multi-cu.exp
@@ -24,9 +24,7 @@ if [is_remote host] {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# We place the entire source code for the test into a single .c file,
# but we generate the DWARF in two separate .S files. Each .S is
diff --git a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
index 22a5f47..b29495a 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-relative-dwo.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/fission-reread.exp b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
index c668208..0ef2b13 100644
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.exp
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.exp
@@ -21,9 +21,7 @@ if [is_remote host] {
}
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/formdata16.exp b/gdb/testsuite/gdb.dwarf2/formdata16.exp
index b6a475d..2366964 100644
--- a/gdb/testsuite/gdb.dwarf2/formdata16.exp
+++ b/gdb/testsuite/gdb.dwarf2/formdata16.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
index 9ba0000..c733318 100644
--- a/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
+++ b/gdb/testsuite/gdb.dwarf2/fortran-var-string.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
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 0915ee4..95093c8 100644
--- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
+++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.exp
@@ -30,9 +30,7 @@ require !use_gdb_stub
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index d8ed180..b9d99c3 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index 248bb28..4ecf440 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
index a3dcb44..8a12e35 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
index ee71dd7..4c40742 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c
diff --git a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
index 0924167..e3a613d 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
set executable ${testfile}
diff --git a/gdb/testsuite/gdb.dwarf2/implptr.exp b/gdb/testsuite/gdb.dwarf2/implptr.exp
index 9da6afe..a309994 100644
--- a/gdb/testsuite/gdb.dwarf2/implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/implptr.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Test DW_OP_GNU_implicit_pointer.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set csrcfile ${testfile}.c
diff --git a/gdb/testsuite/gdb.dwarf2/implptrconst.exp b/gdb/testsuite/gdb.dwarf2/implptrconst.exp
index 24e1341..266fef4 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/implptrpiece.exp b/gdb/testsuite/gdb.dwarf2/implptrpiece.exp
index d895c7e..b30cf2e 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/implref-array.exp b/gdb/testsuite/gdb.dwarf2/implref-array.exp
index 5ca94e9..985d8f7 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-array.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-array.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require 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 db9f770..fb1a958 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-const.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-const.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require 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 2677859..1532d11 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-global.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-global.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require 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 0961f0a..455b38c 100644
--- a/gdb/testsuite/gdb.dwarf2/implref-struct.exp
+++ b/gdb/testsuite/gdb.dwarf2/implref-struct.exp
@@ -23,9 +23,7 @@ if [skip_cplus_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require 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-abstract-const-value.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
index 0c54242..052f893f 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-abstract-const-value.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-};
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
index 14047ab..521ccc3 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-c.exp
@@ -1,9 +1,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-};
+require dwarf2_support
standard_testfile main-foo.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index 09c26eb..dea3f3f 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-};
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
index c7d3741..4806ae1 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp
@@ -29,9 +29,7 @@ if [skip_cplus_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-};
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
index 6f244d1..a23edc8 100644
--- a/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/info-locals-optimized-out.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
index 85d8f0d..28b0e1d 100644
--- a/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
+++ b/gdb/testsuite/gdb.dwarf2/inlined_subroutine-inheritance.exp
@@ -21,9 +21,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/intbits.exp b/gdb/testsuite/gdb.dwarf2/intbits.exp
index c9b2a6d..c52e709 100644
--- a/gdb/testsuite/gdb.dwarf2/intbits.exp
+++ b/gdb/testsuite/gdb.dwarf2/intbits.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
index 02c0deb..efb335e 100644
--- a/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loc-sec-offset.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Test with 32-bit and 64-bit DWARF.
foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
index e2ec8aa..f58be5d 100644
--- a/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/locexpr-data-member-location.exp
@@ -56,9 +56,7 @@ if [skip_shlib_tests] {
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require 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/loclists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
index 7fe632f..ad03cae 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-multiple-cus.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Test with 32-bit and 64-bit DWARF.
foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
index dbc9431..9c00730 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-sec-offset.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Test with 32-bit and 64-bit DWARF.
foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
index 9c8d1a3..0bcdffc 100644
--- a/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
+++ b/gdb/testsuite/gdb.dwarf2/loclists-start-end.exp
@@ -17,9 +17,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Test with 32-bit and 64-bit DWARF.
foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
index c86dce3..db82bb5 100644
--- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
+++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
# bogus file numbers.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
set dwarf_srcfile "file1.txt"
diff --git a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
index d73b517..c4e8a20 100644
--- a/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
+++ b/gdb/testsuite/gdb.dwarf2/macro-source-path.exp
@@ -20,9 +20,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c
diff --git a/gdb/testsuite/gdb.dwarf2/main-subprogram.exp b/gdb/testsuite/gdb.dwarf2/main-subprogram.exp
index 075022a..d52250c 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [use_gdb_stub] } {
unsupported "test requires running"
diff --git a/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp b/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp
index 7436ad4..34dd1b3 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/method-ptr.exp b/gdb/testsuite/gdb.dwarf2/method-ptr.exp
index 800218c..f69f7ae 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp b/gdb/testsuite/gdb.dwarf2/missing-sig-type.exp
index 8087709..9ecca83 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
index d89b675..1159822 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp
@@ -21,9 +21,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .cc .S
diff --git a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
index 2fb1f5d..5e95ac5 100644
--- a/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/missing-type-name.exp
@@ -33,9 +33,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile void-type.c void-type.S
diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
index edc1b45..bcb21b0 100644
--- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp
+++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
index 895a005..17ee1a1 100644
--- a/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
+++ b/gdb/testsuite/gdb.dwarf2/negative-data-member-location.exp
@@ -22,9 +22,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if { ![dwarf2_support] } {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
index 6902c91..871a1867 100644
--- a/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
+++ b/gdb/testsuite/gdb.dwarf2/no-gnu-debuglink.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# No remote host testing either.
if {[is_remote host]} {
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 18be85f..7106f41 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -19,7 +19,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} { return 0 }
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/nostaticblock.exp b/gdb/testsuite/gdb.dwarf2/nostaticblock.exp
index 0ff541a..f732410 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
index 683d12c..28994f9 100644
--- a/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
+++ b/gdb/testsuite/gdb.dwarf2/opaque-type-lookup.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -1.S -2.c
diff --git a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
index 2ed7ac8..90acd39 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces-optimized-out.exp
@@ -16,9 +16,7 @@ load_lib dwarf.exp
# Test some DWARF piece operators.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 targets.
if {![is_x86_like_target]} {
return 0
diff --git a/gdb/testsuite/gdb.dwarf2/pieces.exp b/gdb/testsuite/gdb.dwarf2/pieces.exp
index 3c0d45f..e6666b8 100644
--- a/gdb/testsuite/gdb.dwarf2/pieces.exp
+++ b/gdb/testsuite/gdb.dwarf2/pieces.exp
@@ -16,9 +16,7 @@ load_lib dwarf.exp
# Test some DWARF piece operators.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 targets.
if {![is_x86_like_target]} {
return 0
diff --git a/gdb/testsuite/gdb.dwarf2/pr11465.exp b/gdb/testsuite/gdb.dwarf2/pr11465.exp
index 00bfb2a..94d5344 100644
--- a/gdb/testsuite/gdb.dwarf2/pr11465.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr11465.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S
diff --git a/gdb/testsuite/gdb.dwarf2/pr13961.exp b/gdb/testsuite/gdb.dwarf2/pr13961.exp
index 5dcdb16..63c2595 100644
--- a/gdb/testsuite/gdb.dwarf2/pr13961.exp
+++ b/gdb/testsuite/gdb.dwarf2/pr13961.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Some targets have leading underscores on assembly symbols.
set additional_flags [gdb_target_symbol_prefix_flags_asm]
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
index 2cdc187..a879419 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-multiple-cus.exp
@@ -26,9 +26,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Test with 32-bit and 64-bit DWARF.
foreach_with_prefix is_64 {false true} {
diff --git a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
index 9c1becf..7e7a610 100644
--- a/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
+++ b/gdb/testsuite/gdb.dwarf2/rnglists-sec-offset.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
foreach_with_prefix is_64 {false true} {
if { $is_64 } {
diff --git a/gdb/testsuite/gdb.dwarf2/shortpiece.exp b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
index f16506a..dec219e 100644
--- a/gdb/testsuite/gdb.dwarf2/shortpiece.exp
+++ b/gdb/testsuite/gdb.dwarf2/shortpiece.exp
@@ -16,9 +16,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/staticvirtual.exp b/gdb/testsuite/gdb.dwarf2/staticvirtual.exp
index bead98e..243ce2f 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/struct-decl.exp b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
index b6a1202..83e14a6 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-decl.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-decl.exp
@@ -19,9 +19,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -debug.S
diff --git a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
index a229697..8c83c5d 100644
--- a/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
+++ b/gdb/testsuite/gdb.dwarf2/struct-with-sig.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main-foo.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
index 1b8c19f..b67db8e 100644
--- a/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
+++ b/gdb/testsuite/gdb.dwarf2/subrange-enum.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c -dw.S
diff --git a/gdb/testsuite/gdb.dwarf2/subrange.exp b/gdb/testsuite/gdb.dwarf2/subrange.exp
index f1291a5a..6ee2705 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.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if { [skip_cplus_tests] } { continue }
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
index c0fc5c4..cb9826e 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_fail.exp
@@ -23,9 +23,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Choose suitable integer registers for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
index 1087bc6..0e6ee61 100644
--- a/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
+++ b/gdb/testsuite/gdb.dwarf2/symbol_needs_eval_timeout.exp
@@ -23,9 +23,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Choose suitable integer registers for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index ca71c59..50cb428 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
load_lib gdb-python.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can also only be run when we have python support in gdb,
# but that test can only be done after gdb has started, below.
diff --git a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
index c88bf6b..7e73fd0 100644
--- a/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/template-specification-full-name.exp
@@ -22,9 +22,7 @@
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/trace-crash.exp b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
index 6a9fa33..06c0c67 100644
--- a/gdb/testsuite/gdb.dwarf2/trace-crash.exp
+++ b/gdb/testsuite/gdb.dwarf2/trace-crash.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
load_lib trace-support.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86-64 targets.
if {![istarget x86_64-*] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
index 998e029..0b89741 100644
--- a/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
+++ b/gdb/testsuite/gdb.dwarf2/typeddwarf.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
set test "typeddwarf"
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 and amd64 targets (and not x32).
if { [is_x86_like_target] } {
diff --git a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
index cb2b419..8e5a1ab 100644
--- a/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
+++ b/gdb/testsuite/gdb.dwarf2/typedef-void-finish.exp
@@ -20,9 +20,7 @@ load_lib dwarf.exp
load_lib gdb-python.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile void-type.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/utf-rust.exp b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
index fe4480e..9586d80 100644
--- a/gdb/testsuite/gdb.dwarf2/utf-rust.exp
+++ b/gdb/testsuite/gdb.dwarf2/utf-rust.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile main.c .S
diff --git a/gdb/testsuite/gdb.dwarf2/valop.exp b/gdb/testsuite/gdb.dwarf2/valop.exp
index 068e9a3..848a19d 100644
--- a/gdb/testsuite/gdb.dwarf2/valop.exp
+++ b/gdb/testsuite/gdb.dwarf2/valop.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
# Test DW_OP_stack_value and DW_OP_implicit_value.
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 targets.
if {![is_x86_like_target]} {
return 0
diff --git a/gdb/testsuite/gdb.dwarf2/var-access.exp b/gdb/testsuite/gdb.dwarf2/var-access.exp
index 4dbc960..1cac2e5 100644
--- a/gdb/testsuite/gdb.dwarf2/var-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/var-access.exp
@@ -20,9 +20,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# Choose suitable integer registers for the test.
diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp
index 400a5f8..3faeec1 100644
--- a/gdb/testsuite/gdb.dwarf2/variant.exp
+++ b/gdb/testsuite/gdb.dwarf2/variant.exp
@@ -19,9 +19,7 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use
# gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp
index 76657a7..b27bf54 100644
--- a/gdb/testsuite/gdb.dwarf2/varval.exp
+++ b/gdb/testsuite/gdb.dwarf2/varval.exp
@@ -18,9 +18,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# We'll place the output of Dwarf::assemble in varval.S.
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/void-type.exp b/gdb/testsuite/gdb.dwarf2/void-type.exp
index 38a491d..369cd6e 100644
--- a/gdb/testsuite/gdb.dwarf2/void-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/void-type.exp
@@ -27,9 +27,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c .S
diff --git a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
index 1ca8250..d7786bb 100644
--- a/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
+++ b/gdb/testsuite/gdb.dwarf2/watch-notconst.exp
@@ -17,9 +17,7 @@ load_lib dwarf.exp
set test "watch-notconst"
# This test can only be run on targets which support DWARF-2 and use gas.
-if ![dwarf2_support] {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86 targets.
if { ![is_x86_like_target] } {
diff --git a/gdb/testsuite/gdb.linespec/break-asm-file.exp b/gdb/testsuite/gdb.linespec/break-asm-file.exp
index 1287f51..d5694c4 100644
--- a/gdb/testsuite/gdb.linespec/break-asm-file.exp
+++ b/gdb/testsuite/gdb.linespec/break-asm-file.exp
@@ -24,9 +24,7 @@ set asm_file1 break-asm-file1.s
set asm_file0 break-asm-file0.s
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
if {[gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile}1.o \
object {debug nowarnings optimize=-O0}] != ""} {
diff --git a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
index 369485f..336290e 100644
--- a/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
+++ b/gdb/testsuite/gdb.mi/dw2-ref-missing-frame.exp
@@ -18,9 +18,7 @@ load_lib dwarf.exp
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .S dw2-ref-missing-frame-func.c dw2-ref-missing-frame-main.c
set objsfile [standard_output_file ${testfile}.o]
diff --git a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
index 316909d..94db942 100644
--- a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
+++ b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp
@@ -17,9 +17,7 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
# This test can only be run on x86_64 targets.
if {![istarget "x86_64-*-*"] || ![is_lp64_target]} {
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 9a461ae..d7e5a89 100644
--- a/gdb/testsuite/gdb.trace/entry-values.exp
+++ b/gdb/testsuite/gdb.trace/entry-values.exp
@@ -15,9 +15,7 @@
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c entry-values-dw.S
diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
index 2e88e4e..c000bb1 100644
--- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
+++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp
@@ -16,9 +16,7 @@
load_lib "trace-support.exp"
load_lib dwarf.exp
-if {![dwarf2_support]} {
- return 0
-}
+require dwarf2_support
standard_testfile .c -dbg.S