From patchwork Thu Jan 12 03:00:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63073 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 4B702389367E for ; Thu, 12 Jan 2023 03:08:45 +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 A328338418A5 for ; Thu, 12 Jan 2023 03:01:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A328338418A5 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 2836F1003F602 for ; Thu, 12 Jan 2023 03:01:46 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Fnqcp359pFxgHFnqcpCH15; Thu, 12 Jan 2023 03:01:46 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=ePfWMFl1 c=1 sm=1 tr=0 ts=63bf781a 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=TkTTPzHaAAAA:8 a=9KV2Xqud81a_kjEfOh0A:9 a=_FVE-zBwftR9WsbkzFJk:22 a=Qz3p68GZ3z-NqTySStDO: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=KFXU+E+OyOlpixiIfaAFS4RwsAK3zw76eNY6oq3dT8o=; b=cwfwKd2FiBn0rwAtDo7m8qK87V P+ppaDtCJYg31YJX1wQomoeKzmr6i+tfhFr1e6WskCS1VwZsrPJqb4sdTT1sNVapd+YS+7HzS/2Nx d4av2q7kjUdr/2H00uhnoj/M0; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:60786 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 1pFnqb-000mAD-Si; Wed, 11 Jan 2023 20:01:45 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests Date: Wed, 11 Jan 2023 20:00:41 -0700 Message-Id: <20230112030052.3306113-69-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: 1pFnqb-000mAD-Si X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:60786 X-Source-Auth: tom+tromey.com X-Email-Count: 69 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 skip_hw_watchpoint_tests to invert the sense, and renames it to allow_hw_watchpoint_tests. --- gdb/testsuite/gdb.ada/task_watch.exp | 2 +- gdb/testsuite/gdb.base/break-idempotent.exp | 8 +++--- gdb/testsuite/gdb.base/commands.exp | 8 +++--- gdb/testsuite/gdb.base/cond-eval-mode.exp | 8 +++--- gdb/testsuite/gdb.base/display.exp | 6 ++-- gdb/testsuite/gdb.base/gdb11531.exp | 6 ++-- gdb/testsuite/gdb.base/pr11022.exp | 2 +- gdb/testsuite/gdb.base/recurse.exp | 8 +++--- gdb/testsuite/gdb.base/value-double-free.exp | 6 ++-- gdb/testsuite/gdb.base/watch-bitfields.exp | 6 ++-- gdb/testsuite/gdb.base/watch-cond-infcall.exp | 6 ++-- gdb/testsuite/gdb.base/watch-cond.exp | 10 +++---- gdb/testsuite/gdb.base/watch-vfork.exp | 2 +- .../gdb.base/watchpoint-hw-attach.exp | 2 +- gdb/testsuite/gdb.base/watchpoint-hw.exp | 2 +- .../gdb.base/watchpoint-reuse-slot.exp | 6 ++-- gdb/testsuite/gdb.base/watchpoint-solib.exp | 6 ++-- .../watchpoint-stops-at-right-insn.exp | 2 +- .../gdb.base/watchpoint-unaligned.exp | 2 +- gdb/testsuite/gdb.base/watchpoint.exp | 28 +++++++++---------- gdb/testsuite/gdb.base/watchpoints.exp | 6 ++-- gdb/testsuite/gdb.cp/watch-cp.exp | 2 +- gdb/testsuite/gdb.mi/mi-watch-nonstop.exp | 2 +- gdb/testsuite/gdb.mi/mi-watch.exp | 8 +++--- gdb/testsuite/gdb.mi/pr11022.exp | 2 +- gdb/testsuite/gdb.python/py-breakpoint.exp | 16 +++++------ .../process-dies-while-detaching.exp | 2 +- .../step-over-trips-on-watchpoint.exp | 2 +- gdb/testsuite/gdb.threads/watchpoint-fork.exp | 10 +++---- gdb/testsuite/gdb.threads/watchthreads2.exp | 2 +- gdb/testsuite/gdb.threads/wp-replication.exp | 2 +- gdb/testsuite/lib/gdb.exp | 14 +++++----- 32 files changed, 97 insertions(+), 97 deletions(-) diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp index fc8319e271c..0641008fb51 100644 --- a/gdb/testsuite/gdb.ada/task_watch.exp +++ b/gdb/testsuite/gdb.ada/task_watch.exp @@ -19,7 +19,7 @@ load_lib "ada.exp" require allow_ada_tests -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_ada_testfile foo diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp index 4d74bb54a1e..559a3a6306b 100644 --- a/gdb/testsuite/gdb.base/break-idempotent.exp +++ b/gdb/testsuite/gdb.base/break-idempotent.exp @@ -36,11 +36,11 @@ standard_testfile -# The skip_hw_watchpoint_tests starts GDB on a small test program to +# The allow_hw_watchpoint_tests starts GDB on a small test program to # check if HW watchpoints are supported. We do not want to restart # GDB after this test script has itself started GDB, so call -# skip_hw_watchpoint_tests first and cache the result. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +# allow_hw_watchpoint_tests first and cache the result. +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] # Force a breakpoint re-set in GDB. Currently this is done by # reloading symbols with the "file" command. @@ -180,7 +180,7 @@ foreach_with_prefix pie { "nopie" "pie" } { test_break $always_inserted "hbreak" } - if {!$skip_hw_watchpoint_tests_p} { + if {$allow_hw_watchpoint_tests_p} { test_break $always_inserted "watch" } diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index 2c3f168d21e..316897f9c5c 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -17,13 +17,13 @@ # test special commands (if, while, etc) # -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -550,10 +550,10 @@ proc_with_prefix user_defined_command_manyargs_test {} { proc_with_prefix watchpoint_command_test {} { global gdb_prompt - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # Disable hardware watchpoints if necessary. - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp index 010350f1458..16fb067bde8 100644 --- a/gdb/testsuite/gdb.base/cond-eval-mode.exp +++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp @@ -15,13 +15,13 @@ # Test 'set breakpoint condition-evaluation' settings -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -119,10 +119,10 @@ proc test_break { break_command } { # proc test_watch { watch_command } { global gdb_prompt - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p with_test_prefix "$watch_command" { - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { unsupported "no target support" return } diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp index 405ae6935ca..cacd6f530d4 100644 --- a/gdb/testsuite/gdb.base/display.exp +++ b/gdb/testsuite/gdb.base/display.exp @@ -17,13 +17,13 @@ # Also do some printing stuff for coverage's sake. # -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -65,7 +65,7 @@ if {![runto_main]} { } # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/gdb11531.exp index 9b5c70ee75a..bf4fcfbe238 100644 --- a/gdb/testsuite/gdb.base/gdb11531.exp +++ b/gdb/testsuite/gdb.base/gdb11531.exp @@ -19,13 +19,13 @@ # This is a problem related to CANNOT_STEP_HW_WATCHPOINTS macro. # It affects Solaris native targets. -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -34,7 +34,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } { } # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp index bf329bc383f..ffafe2d3222 100644 --- a/gdb/testsuite/gdb.base/pr11022.exp +++ b/gdb/testsuite/gdb.base/pr11022.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_testfile .c diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/recurse.exp index 21b378ed7c6..c9a44e9e4e2 100644 --- a/gdb/testsuite/gdb.base/recurse.exp +++ b/gdb/testsuite/gdb.base/recurse.exp @@ -15,13 +15,13 @@ # This file was written by Jeff Law. (law@cs.utah.edu) -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -32,9 +32,9 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { proc recurse_tests {} { # Disable hardware watchpoints if necessary. - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/value-double-free.exp b/gdb/testsuite/gdb.base/value-double-free.exp index 7602097d959..9ac7a0715dc 100644 --- a/gdb/testsuite/gdb.base/value-double-free.exp +++ b/gdb/testsuite/gdb.base/value-double-free.exp @@ -13,13 +13,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -32,7 +32,7 @@ if ![runto_main] { } # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/watch-bitfields.exp b/gdb/testsuite/gdb.base/watch-bitfields.exp index 07ab2934394..ce2aee2ac18 100644 --- a/gdb/testsuite/gdb.base/watch-bitfields.exp +++ b/gdb/testsuite/gdb.base/watch-bitfields.exp @@ -15,14 +15,14 @@ # This file is part of the gdb testsuite -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. # Disable hardware watchpoints if the target does not support them. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -101,7 +101,7 @@ proc test_regular_watch {} { } # Disable hardware watchpoints if the target does not support them. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/watch-cond-infcall.exp b/gdb/testsuite/gdb.base/watch-cond-infcall.exp index bdad05a0740..c8f5d584fc7 100644 --- a/gdb/testsuite/gdb.base/watch-cond-infcall.exp +++ b/gdb/testsuite/gdb.base/watch-cond-infcall.exp @@ -16,13 +16,13 @@ # Test for watchpoints with conditions that involve inferior function # calls. -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -57,7 +57,7 @@ proc test_watchpoint { hw } { "atchpoint \[0-9\]+: var\r\n\r\nOld value = 0\r\nNew value = 1\r\n.*watchpoint-stop.*" } -if { !$skip_hw_watchpoint_tests_p } { +if { $allow_hw_watchpoint_tests_p } { with_test_prefix "hw" { test_watchpoint 1 } } diff --git a/gdb/testsuite/gdb.base/watch-cond.exp b/gdb/testsuite/gdb.base/watch-cond.exp index 884b5f85e9d..ddcde9a94c2 100644 --- a/gdb/testsuite/gdb.base/watch-cond.exp +++ b/gdb/testsuite/gdb.base/watch-cond.exp @@ -17,13 +17,13 @@ # Tests involving watchpoint conditions with local expressions. # -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile .c @@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } @@ -51,7 +51,7 @@ gdb_test "continue" \ clean_restart ${testfile} # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } @@ -70,7 +70,7 @@ gdb_test "continue" \ clean_restart ${testfile} # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.base/watch-vfork.exp index 180641ab6b7..2d36a4d5446 100644 --- a/gdb/testsuite/gdb.base/watch-vfork.exp +++ b/gdb/testsuite/gdb.base/watch-vfork.exp @@ -44,7 +44,7 @@ proc test_watchpoint_across_vfork { hw teststr } { "Watchpoint triggers after vfork ($teststr)" } -if { ![skip_hw_watchpoint_tests] } { +if { [allow_hw_watchpoint_tests] } { test_watchpoint_across_vfork 1 "hw" } diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp index e8720458072..785fc35f7bc 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp @@ -16,7 +16,7 @@ # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used # when attaching to a target. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp index 4b32215344a..13871912d09 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp @@ -15,7 +15,7 @@ require !use_gdb_stub -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_testfile diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp index 24ab5b3d3e6..9772d09f170 100644 --- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp +++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp @@ -22,13 +22,13 @@ # operation. (Note that we don't have any of these watchpoints # trigger.) -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] # starting the test. @@ -295,7 +295,7 @@ proc setup_and_run_watchpoints_tests { hw_wp_p } { # Run tests with hardware watchpoints disabled, then again with them # enabled (if this target supports hardware watchpoints). -if { !$skip_hw_watchpoint_tests_p } { +if { $allow_hw_watchpoint_tests_p } { # Run test with H/W enabled. setup_and_run_watchpoints_tests 1 } diff --git a/gdb/testsuite/gdb.base/watchpoint-solib.exp b/gdb/testsuite/gdb.base/watchpoint-solib.exp index 559d77c82be..0492cf66037 100644 --- a/gdb/testsuite/gdb.base/watchpoint-solib.exp +++ b/gdb/testsuite/gdb.base/watchpoint-solib.exp @@ -13,13 +13,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] # # test running programs @@ -60,7 +60,7 @@ gdb_load_shlib $lib_sl runto_main # Disable hardware watchpoints if necessary. -if {$skip_hw_watchpoint_tests_p} { +if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp index 585669dd0fd..d45cfd9c742 100644 --- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp +++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp @@ -71,7 +71,7 @@ standard_testfile # No use testing this if we can't use hardware watchpoints. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1 diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp index 33fc1c1b5d0..ce5a1e5bf66 100644 --- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp +++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp @@ -17,7 +17,7 @@ # Test inserting read watchpoints on unaligned addresses. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_testfile if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 5f5e7923c79..513964ebf86 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -15,13 +15,13 @@ # This file was written by Fred Fish. (fnf@cygnus.com) -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -631,14 +631,14 @@ proc test_watch_location {} { proc test_wide_location_1 {} { global no_hw global gdb_prompt - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # This test watches two words on most 32-bit ABIs, and one word on # most 64-bit ABIs. # Platforms where the target can't watch such a large region # should clear hw_expected below. - if { $no_hw || $skip_hw_watchpoint_tests_p + if { $no_hw || !$allow_hw_watchpoint_tests_p || [istarget arm*-*-*] || ([istarget powerpc*-*-*] && ![is_lp64_target])} { set hw_expected 0 @@ -679,14 +679,14 @@ proc test_wide_location_1 {} { proc test_wide_location_2 {} { global no_hw global gdb_prompt - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # This test watches four words on most 32-bit ABIs, and two words # on 64-bit ABIs. # Platforms where the target can't watch such a large region # should clear hw_expected below. - if { $no_hw || $skip_hw_watchpoint_tests_p + if { $no_hw || !$allow_hw_watchpoint_tests_p || [istarget arm*-*-*] || [istarget powerpc*-*-*]} { set hw_expected 0 @@ -803,7 +803,7 @@ proc test_inaccessible_watchpoint {} { proc test_no_hw_watchpoints {} { global testfile - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p clean_restart $testfile @@ -849,7 +849,7 @@ proc test_no_hw_watchpoints {} { # Re-enable hardware watchpoints if necessary. - if {!$skip_hw_watchpoint_tests_p} { + if {$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 1" "" } } @@ -901,9 +901,9 @@ proc test_watchpoint_in_big_blob {} { proc test_watch_register_location {} { global no_hw - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p - if {!$no_hw && !$skip_hw_watchpoint_tests_p} { + if {!$no_hw && $allow_hw_watchpoint_tests_p} { # Non-memory read/access watchpoints are not supported, they would # require software read/access watchpoint support (which is not # currently available). @@ -927,11 +927,11 @@ test_no_hw_watchpoints proc do_tests {} { global testfile global no_hw - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p clean_restart $testfile - if {$no_hw || $skip_hw_watchpoint_tests_p} { + if {$no_hw || !$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0"\ "disable fast watches, 1" } @@ -951,7 +951,7 @@ proc do_tests {} { # `initialize' anymore. clean_restart $testfile - if {$no_hw || $skip_hw_watchpoint_tests_p} { + if {$no_hw || !$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" \ "disable fast watches, 2" } @@ -989,7 +989,7 @@ proc do_tests {} { # watchpoints force-disabled. do_tests -if {!$skip_hw_watchpoint_tests_p} { +if {$allow_hw_watchpoint_tests_p} { with_test_prefix "no-hw" { set no_hw 1 do_tests diff --git a/gdb/testsuite/gdb.base/watchpoints.exp b/gdb/testsuite/gdb.base/watchpoints.exp index 150389c1602..6860774fcc8 100644 --- a/gdb/testsuite/gdb.base/watchpoints.exp +++ b/gdb/testsuite/gdb.base/watchpoints.exp @@ -15,13 +15,13 @@ # This file was written by Pierre Muller. (muller@ics.u-strasbg.fr) -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile @@ -56,7 +56,7 @@ with_test_prefix "before inferior start" { clean_restart ${binfile} # Disable hardware watchpoints if necessary. - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } diff --git a/gdb/testsuite/gdb.cp/watch-cp.exp b/gdb/testsuite/gdb.cp/watch-cp.exp index 6ef245e9e72..4dc345d9403 100644 --- a/gdb/testsuite/gdb.cp/watch-cp.exp +++ b/gdb/testsuite/gdb.cp/watch-cp.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require allow_cplus_tests !skip_hw_watchpoint_tests +require allow_cplus_tests allow_hw_watchpoint_tests standard_testfile .cc diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp index b3dc7b772e4..bb884c69a0b 100644 --- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp +++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !skip_hw_watchpoint_tests support_displaced_stepping +require allow_hw_watchpoint_tests support_displaced_stepping load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index d6053a17f69..a6e6f89bc11 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -20,13 +20,13 @@ # The goal is not to test gdb functionality, which is done by other # tests, but to verify the correct output response to MI operations. -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] load_lib mi-support.exp set MIFLAGS "-i=mi" @@ -146,9 +146,9 @@ proc test_watchpoint_all {mi_mode type} { upvar srcdir srcdir upvar subdir subdir upvar binfile binfile - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p - if {$type == "hw" && $skip_hw_watchpoint_tests_p } { + if {$type == "hw" && !$allow_hw_watchpoint_tests_p } { return } diff --git a/gdb/testsuite/gdb.mi/pr11022.exp b/gdb/testsuite/gdb.mi/pr11022.exp index fcfad4400d3..0df19bb6c5d 100644 --- a/gdb/testsuite/gdb.mi/pr11022.exp +++ b/gdb/testsuite/gdb.mi/pr11022.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index 0995ae49ead..a3a8512c4d9 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -16,13 +16,13 @@ # This file is part of the GDB testsuite. It tests the mechanism # exposing breakpoints to Python. -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] load_lib gdb-python.exp @@ -283,13 +283,13 @@ proc_with_prefix test_hardware_breakpoints { } { proc_with_prefix test_watchpoints { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # Start with a fresh gdb. clean_restart ${testfile} # Disable hardware watchpoints if necessary. - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } @@ -307,13 +307,13 @@ proc_with_prefix test_watchpoints { } { proc_with_prefix test_bkpt_internal { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # Start with a fresh gdb. clean_restart ${testfile} # Disable hardware watchpoints if necessary. - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } if {![runto_main]} { @@ -355,13 +355,13 @@ proc_with_prefix test_bkpt_internal { } { proc_with_prefix test_bkpt_eval_funcs { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p # Start with a fresh gdb. clean_restart ${testfile} # Disable hardware watchpoints if necessary. - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } if {![runto_main]} { diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp index 34003678d4f..bbbe82df30c 100644 --- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp +++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp @@ -235,7 +235,7 @@ proc test_detach {multi_process cmd} { # Same as test_detach, except set a watchpoint before detaching. proc test_detach_watch {wp multi_process cmd} { - if { $wp == "hw" && [skip_hw_watchpoint_tests] } { + if { $wp == "hw" && ![allow_hw_watchpoint_tests] } { unsupported "hw watchpoint" return } diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp index f271c468aff..45f4b76958d 100644 --- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp +++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp @@ -22,7 +22,7 @@ set executable ${testfile} # This test verifies that a watchpoint is detected in a multithreaded # program so the test is only meaningful on a system with hardware # watchpoints. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable [list debug "incdir=${objdir}"]] != "" } { diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index ed562f0eae3..d3804e68f88 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -15,13 +15,13 @@ # Test case for forgotten hw-watchpoints after fork()-off of a process. -# The skip_hw_watchpoint_tests checks if watchpoints are supported by the +# The allow_hw_watchpoint_tests checks if watchpoints are supported by the # processor. On PowerPC, the check runs a small test program under gdb # to determine if the Power processor supports HW watchpoints. The check # must be done before starting the test so as to not disrupt the execution # of the actual test. -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] set testfile watchpoint-fork @@ -29,7 +29,7 @@ set testfile watchpoint-fork set debug 0 proc test {type symbol} { - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p global debug with_test_prefix "$type" { global testfile subdir srcdir gdb_prompt @@ -50,7 +50,7 @@ proc test {type symbol} { clean_restart $executable - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { # The software watchpoint functionality is in GDB an unrelated test. gdb_test_no_output "set can-use-hw-watchpoints 0" # Software watchpoints can be quite slow on remote targets @@ -102,7 +102,7 @@ proc test {type symbol} { # threads - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { # Watchpoint hits would get detected in unexpected threads. return } diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp index e9db6781708..09858aee486 100644 --- a/gdb/testsuite/gdb.threads/watchthreads2.exp +++ b/gdb/testsuite/gdb.threads/watchthreads2.exp @@ -24,7 +24,7 @@ set X_INCR_COUNT 10 # This test verifies that a watchpoint is detected in the proper thread # so the test is only meaningful on a system with hardware watchpoints. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_testfile if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } { diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp index 7da66f386ab..ccb05b57852 100644 --- a/gdb/testsuite/gdb.threads/wp-replication.exp +++ b/gdb/testsuite/gdb.threads/wp-replication.exp @@ -27,7 +27,7 @@ set NR_TRIGGERS_PER_THREAD 2 # This test verifies that a hardware watchpoint gets replicated to # every existing thread and is detected properly. This test is # only meaningful on a target with hardware watchpoint support. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests standard_testfile if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 446f89a8a25..7143908bbc2 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4039,12 +4039,12 @@ proc skip_hw_breakpoint_tests {} { return 1 } -# Return a 1 if we should skip tests that require hardware watchpoints +# Return a 1 if we should run tests that require hardware watchpoints -proc skip_hw_watchpoint_tests {} { +proc allow_hw_watchpoint_tests {} { # Skip tests if requested by the board if { [target_info exists gdb,no_hardware_watchpoints]} { - return 1 + return 0 } # These targets support hardware watchpoints natively @@ -4058,17 +4058,17 @@ proc skip_hw_watchpoint_tests {} { || [istarget "aarch64*-*-*"] || ([istarget "powerpc*-*-linux*"] && [has_hw_wp_support]) || [istarget "s390*-*-*"] } { - return 0 + return 1 } - return 1 + return 0 } # Return a 1 if we should run tests that require *multiple* hardware # watchpoints to be active at the same time proc allow_hw_watchpoint_multi_tests {} { - if { [skip_hw_watchpoint_tests] } { + if { ![allow_hw_watchpoint_tests] } { return 0 } @@ -4084,7 +4084,7 @@ proc allow_hw_watchpoint_multi_tests {} { # Return a 1 if we should run tests that require read/access watchpoints proc allow_hw_watchpoint_access_tests {} { - if { [skip_hw_watchpoint_tests] } { + if { ![allow_hw_watchpoint_tests] } { return 0 }