From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id D018A3857438; Fri, 13 Jan 2023 20:36:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D018A3857438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673642218; bh=vVW7xTbSYtLYwhU5QIttud6VUAdPajiv8/HLI8v0xkA=; h=From:To:Subject:Date:From; b=lUlac7Kk8Lu1VvF1ft2H/575cW9lPCyciJwc1SxtdroyKkWkq3rPBs5uLLLoxR5fq BOIslVhQfCQJNL48E6Um4rJOWnHBwCpGZR/T1LpYFV/9njEXvGyuP7R9ugcBPvG4pH C8Wfhk3c36x8+CcmUXdQkOintsr6BuS7JjTWmpKY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use require is_c_compiler_gcc X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 78a1c061b2ad49c687ca1ecc4e87acadfad37e1f X-Git-Newrev: 402c7447615b8099756e68d8d6d0d1627133a863 Message-Id: <20230113203658.D018A3857438@sourceware.org> Date: Fri, 13 Jan 2023 20:36:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D402c7447615b= 8099756e68d8d6d0d1627133a863 commit 402c7447615b8099756e68d8d6d0d1627133a863 Author: Tom Tromey Date: Wed Dec 14 10:13:01 2022 -0700 Use require is_c_compiler_gcc =20 This changes some tests to use "require is_c_compiler_gcc". Diff: --- gdb/testsuite/gdb.base/morestack.exp | 5 +---- gdb/testsuite/gdb.base/prelink.exp | 7 +------ gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp | 4 +--- gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-ranges.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp | 5 +---- gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp | 5 +---- 21 files changed, 21 insertions(+), 77 deletions(-) diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/= morestack.exp index 5c1f0307ffe..a60a3de5a3a 100644 --- a/gdb/testsuite/gdb.base/morestack.exp +++ b/gdb/testsuite/gdb.base/morestack.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . =20 -if {![is_c_compiler_gcc]} { - unsupported "gcc compiler is required" - return -} +require is_c_compiler_gcc =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/pr= elink.exp index 1e40aecc92b..4d61686c530 100644 --- a/gdb/testsuite/gdb.base/prelink.exp +++ b/gdb/testsuite/gdb.base/prelink.exp @@ -19,16 +19,11 @@ # This file was written by Alexandre Oliva =20 =20 -require isnative !skip_shlib_tests +require isnative !skip_shlib_tests is_c_compiler_gcc if { [is_remote host] } { return } =20 -if {![is_c_compiler_gcc]} { - unsupported "gcc compiler is required" - return -1 -} - load_lib prelink-support.exp =20 set testfile "prelink" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp b/gdb/te= stsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp index 5a92fdf16d0..2fae105cbc8 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-disasm-over-non-stmt.exp @@ -28,9 +28,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 # Reuse many of the test source files from dw2-inline-header-1.exp. standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsui= te/gdb.dwarf2/dw2-inline-header-1.exp index 3293d6152c0..2494489549f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp @@ -56,9 +56,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 # Prepare and run the test. proc do_test { start_label func_name tag } { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsui= te/gdb.dwarf2/dw2-inline-header-2.exp index 5caa9cc9469..bbc14d4a2f6 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp @@ -51,9 +51,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsui= te/gdb.dwarf2/dw2-inline-header-3.exp index b98d6003c96..682778479cb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp @@ -40,9 +40,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/test= suite/gdb.dwarf2/dw2-inline-many-frames.exp index 9f5007765eb..29598cb02e7 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp @@ -29,9 +29,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c .S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/tests= uite/gdb.dwarf2/dw2-inline-small-func.exp index c3120a28223..fcde45f80a2 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp @@ -30,9 +30,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile -lbls.c .S \ .c .h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsui= te/gdb.dwarf2/dw2-inline-stepping.exp index 87c70a4e1fc..d3dc4484073 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp @@ -29,9 +29,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c .S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb= .dwarf2/dw2-is-stmt-2.exp index 7e9151da73f..d149efdca1c 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp @@ -29,9 +29,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c .S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.d= warf2/dw2-is-stmt.exp index 74faf112594..79e6de789aa 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp @@ -29,9 +29,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c .S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsu= ite/gdb.dwarf2/dw2-line-number-zero.exp index 2b473776599..68696f0b634 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp @@ -18,10 +18,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp b/gdb/tes= tsuite/gdb.dwarf2/dw2-main-no-line-number.exp index 317ea21574e..888a20c23c5 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-main-no-line-number.exp @@ -22,10 +22,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile main.c -dw.S =20 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 5e44badb179..c0a33b95b65 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 @@ -22,10 +22,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile main.c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/g= db.dwarf2/dw2-ranges-base.exp index 6fd837c97df..147e943361e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp @@ -21,10 +21,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/g= db.dwarf2/dw2-ranges-func.exp index 7db7cd2e3f6..c3a1261d133 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp @@ -19,10 +19,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support =20 -if ![is_c_compiler_gcc] { - unsupported "gcc required for this test" - return 0 -} +require is_c_compiler_gcc =20 proc do_test {suffix} { global gdb_test_file_name diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuit= e/gdb.dwarf2/dw2-ranges-overlap.exp index bb92d7e66d6..b9466eecd3b 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp @@ -25,10 +25,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/g= db.dwarf2/dw2-ranges-psym.exp index e195969fd68..75c6b874fc9 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp @@ -20,10 +20,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support =20 -if ![is_c_compiler_gcc] { - unsupported "gcc required for this test" - return 0 -} +require is_c_compiler_gcc =20 standard_testfile main.c .c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dw= arf2/dw2-ranges.exp index de272c875fd..7845ea6a22a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp @@ -21,10 +21,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 =20 -} +require is_c_compiler_gcc =20 standard_testfile .c -2.c -3.c set asmfile [standard_output_file ${testfile}.s] diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp = b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp index 5073611e230..a02e670c5b5 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 @@ -31,10 +31,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c -dw.S =20 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/= testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp index c5a59f04aa8..be925887c05 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp @@ -18,10 +18,7 @@ load_lib dwarf.exp require dwarf2_support =20 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc =20 standard_testfile .c -dw.S