From patchwork Thu Jan 12 03:00:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63041 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EDC74395C03F for ; Thu, 12 Jan 2023 03:06:13 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from alt-proxy28.mail.unifiedlayer.com (alt-proxy28.mail.unifiedlayer.com [74.220.216.123]) by sourceware.org (Postfix) with ESMTPS id 2EC0738493E0 for ; Thu, 12 Jan 2023 03:01:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2EC0738493E0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway1.mail.pro1.eigbox.com (Postfix) with ESMTP id 9FE321003F5FD for ; Thu, 12 Jan 2023 03:01:27 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id FnqJp34tfFxgHFnqJpCGl2; Thu, 12 Jan 2023 03:01:27 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=ePfWMFl1 c=1 sm=1 tr=0 ts=63bf7807 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RvmDmJFTN0MA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=20KFwNOVAAAA:8 a=Dno1pAbQbK9lgLVT2iMA:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mHH3twRMGA8Hc5dxs3ddllfHeAyN2w9oTadknAV3T9I=; b=xyLIBT2xXgItzH1ILxKq9pReUj +Ymiq0wt7ovwE6GWUDzLg89DjbHDOI0Ih4He8Zji68NMzljNn0nLAMmSUNNST+k5izZ8hmoZCzysU UrR9nki+tQwU2/4YIGdgcln7S; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:36770 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFnqJ-000liJ-8g; Wed, 11 Jan 2023 20:01:27 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 37/79] Use require is_c_compiler_gcc Date: Wed, 11 Jan 2023 20:00:10 -0700 Message-Id: <20230112030052.3306113-38-tom@tromey.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112030052.3306113-1-tom@tromey.com> References: <20230112030052.3306113-1-tom@tromey.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.76.186 X-Source-L: No X-Exim-ID: 1pFnqJ-000liJ-8g X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:36770 X-Source-Auth: tom+tromey.com X-Email-Count: 38 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This changes some tests to use "require is_c_compiler_gcc". --- 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.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 . -if {![is_c_compiler_gcc]} { - unsupported "gcc compiler is required" - return -} +require is_c_compiler_gcc standard_testfile diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.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 -require isnative !skip_shlib_tests +require isnative !skip_shlib_tests is_c_compiler_gcc if { [is_remote host] } { return } -if {![is_c_compiler_gcc]} { - unsupported "gcc compiler is required" - return -1 -} - load_lib prelink-support.exp set testfile "prelink" 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 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc # Reuse many of the test source files from dw2-inline-header-1.exp. standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-1.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc # Prepare and run the test. proc do_test { start_label func_name tag } { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-2.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-header-3.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile dw2-inline-header-lbls.c dw2-inline-header.S \ dw2-inline-header.c dw2-inline-header.h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-many-frames.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-small-func.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile -lbls.c .S \ .c .h diff --git a/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp b/gdb/testsuite/gdb.dwarf2/dw2-inline-stepping.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt-2.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-is-stmt.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - return 0 -} +require is_c_compiler_gcc standard_testfile .c .S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp b/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -dw.S 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 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp b/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile main.c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp index 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 -if ![is_c_compiler_gcc] { - unsupported "gcc required for this test" - return 0 -} +require is_c_compiler_gcc proc do_test {suffix} { global gdb_test_file_name diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-overlap.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges-psym.exp index 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 -if ![is_c_compiler_gcc] { - unsupported "gcc required for this test" - return 0 -} +require is_c_compiler_gcc standard_testfile main.c .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp b/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -2.c -3.c set asmfile [standard_output_file ${testfile}.s] diff --git a/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp b/gdb/testsuite/gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -dw.S diff --git a/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp b/gdb/testsuite/gdb.dwarf2/dw2-vendor-extended-opcode.exp index 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 # The .c files use __attribute__. -if ![is_c_compiler_gcc] { - verbose "Skipping $gdb_test_file_name." - return 0 -} +require is_c_compiler_gcc standard_testfile .c -dw.S