From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 1DADA3858425; Fri, 13 Jan 2023 20:39:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DADA3858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673642376; bh=wZEPJAdbtkwGVhpucauEveFWydy3MjFQCQWJ2xXVG3Q=; h=From:To:Subject:Date:From; b=xtokRJpR4LrXssyqJnCfU6VXyPO2elinY9fZNChHXDBd4Leu2djVa7JELyQfRhVRD ugCYQtJ21tsVCwrcjaOPbRyAKgeD6eaGhjrUbbVEMv3U49BHEwc6Cv2c7gMSrLJb9j vT8vb3tnB85KCiQBSGvsEsUvRiQ5+K9J9/b6kmWo= 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] Rename to allow_hw_watchpoint_tests X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 9bc8ef1d750796d69d38f1822c8dd6df5729a187 X-Git-Newrev: e379cbb128e3e672af03bdbb97e6e4085925d1bc Message-Id: <20230113203936.1DADA3858425@sourceware.org> Date: Fri, 13 Jan 2023 20:39:36 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De379cbb128e3= e672af03bdbb97e6e4085925d1bc commit e379cbb128e3e672af03bdbb97e6e4085925d1bc Author: Tom Tromey Date: Sun Jan 8 11:40:32 2023 -0700 Rename to allow_hw_watchpoint_tests =20 This changes skip_hw_watchpoint_tests to invert the sense, and renames it to allow_hw_watchpoint_tests. Diff: --- 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/testsuite/gdb.base/watchpoint-hw-attach.exp | 2 +- gdb/testsuite/gdb.base/watchpoint-hw.exp | 2 +- gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 6 ++--- gdb/testsuite/gdb.base/watchpoint-solib.exp | 6 ++--- .../gdb.base/watchpoint-stops-at-right-insn.exp | 2 +- gdb/testsuite/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 ++++++------- .../gdb.threads/process-dies-while-detaching.exp | 2 +- .../gdb.threads/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/t= ask_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" =20 require allow_ada_tests =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 standard_ada_testfile foo =20 diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gd= b.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 @@ =20 standard_testfile =20 -# 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] =20 # 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" } =20 - if {!$skip_hw_watchpoint_tests_p} { + if {$allow_hw_watchpoint_tests_p} { test_break $always_inserted "watch" } =20 diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/c= ommands.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) # =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -550,10 +550,10 @@ proc_with_prefix user_defined_command_manyargs_test {= } { =20 proc_with_prefix watchpoint_command_test {} { global gdb_prompt - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 # 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" "" } =20 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 @@ =20 # Test 'set breakpoint condition-evaluation' settings =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -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 =20 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/di= splay.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. # =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -65,7 +65,7 @@ if {![runto_main]} { } =20 # 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" "" } =20 diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/g= db11531.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. =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -34,7 +34,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $= testfile.c {debug}] } { } =20 # 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" "" } =20 diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr= 11022.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 . =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 standard_testfile .c =20 diff --git a/gdb/testsuite/gdb.base/recurse.exp b/gdb/testsuite/gdb.base/re= curse.exp index 21b378ed7c6..c9a44e9e4e2 100644 --- a/gdb/testsuite/gdb.base/recurse.exp +++ b/gdb/testsuite/gdb.base/recurse.exp @@ -15,13 +15,13 @@ =20 # This file was written by Jeff Law. (law@cs.utah.edu) =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -32,9 +32,9 @@ if {[prepare_for_testing "failed to prepare" $testfile $s= rcfile debug]} { proc recurse_tests {} { =20 # Disable hardware watchpoints if necessary. - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 - if {$skip_hw_watchpoint_tests_p} { + if {!$allow_hw_watchpoint_tests_p} { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } =20 diff --git a/gdb/testsuite/gdb.base/value-double-free.exp b/gdb/testsuite/g= db.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 . =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -32,7 +32,7 @@ if ![runto_main] { } =20 # 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" "" } =20 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 @@ =20 # This file is part of the gdb testsuite =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -101,7 +101,7 @@ proc test_regular_watch {} { } =20 # 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" "" } =20 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. =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -57,7 +57,7 @@ proc test_watchpoint { hw } { "atchpoint \[0-9\]+: var\r\n\r\nOld value =3D 0\r\nNew value =3D 1\r\n.*w= atchpoint-stop.*" } =20 -if { !$skip_hw_watchpoint_tests_p } { +if { $allow_hw_watchpoint_tests_p } { with_test_prefix "hw" { test_watchpoint 1 } } =20 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. # =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile .c =20 @@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}= ${srcfile}] } { } =20 # 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" "" } =20 @@ -51,7 +51,7 @@ gdb_test "continue" \ clean_restart ${testfile} =20 # 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" "" } =20 @@ -70,7 +70,7 @@ gdb_test "continue" \ clean_restart ${testfile} =20 # 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" "" } =20 diff --git a/gdb/testsuite/gdb.base/watch-vfork.exp b/gdb/testsuite/gdb.bas= e/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)" } =20 -if { ![skip_hw_watchpoint_tests] } { +if { [allow_hw_watchpoint_tests] } { test_watchpoint_across_vfork 1 "hw" } =20 diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuit= e/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. =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 require can_spawn_for_attach =20 diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.b= ase/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 @@ =20 require !use_gdb_stub =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsui= te/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.) =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 # starting the test. =20 @@ -295,7 +295,7 @@ proc setup_and_run_watchpoints_tests { hw_wp_p } { =20 # 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/gd= b.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 . =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 # # test running programs @@ -60,7 +60,7 @@ gdb_load_shlib $lib_sl runto_main =20 # 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" "" } =20 diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gd= b/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 =20 # No use testing this if we can't use hardware watchpoints. -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1 diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuit= e/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 @@ =20 # Test inserting read watchpoints on unaligned addresses. =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 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 @@ =20 # This file was written by Fred Fish. (fnf@cygnus.com) =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 standard_testfile =20 @@ -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 =20 # This test watches two words on most 32-bit ABIs, and one word on # most 64-bit ABIs. =20 # 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 =20 # This test watches four words on most 32-bit ABIs, and two words # on 64-bit ABIs. =20 # 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 {} { =20 proc test_no_hw_watchpoints {} { global testfile - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 clean_restart $testfile =20 @@ -849,7 +849,7 @@ proc test_no_hw_watchpoints {} { =20 =20 # 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 {} { =20 proc test_watch_register_location {} { global no_hw - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 - 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 =20 clean_restart $testfile =20 - 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 =20 - 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. =20 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.bas= e/watchpoints.exp index 150389c1602..6860774fcc8 100644 --- a/gdb/testsuite/gdb.base/watchpoints.exp +++ b/gdb/testsuite/gdb.base/watchpoints.exp @@ -15,13 +15,13 @@ =20 # This file was written by Pierre Muller. (muller@ics.u-strasbg.fr) =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 =20 standard_testfile @@ -56,7 +56,7 @@ with_test_prefix "before inferior start" { clean_restart ${binfile} =20 # 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" "" } =20 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 . =20 -require allow_cplus_tests !skip_hw_watchpoint_tests +require allow_cplus_tests allow_hw_watchpoint_tests =20 standard_testfile .cc =20 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 . =20 -require !skip_hw_watchpoint_tests support_displaced_stepping +require allow_hw_watchpoint_tests support_displaced_stepping =20 load_lib mi-support.exp set MIFLAGS "-i=3Dmi" diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-wa= tch.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. =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 load_lib mi-support.exp set MIFLAGS "-i=3Dmi" @@ -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 =20 - if {$type =3D=3D "hw" && $skip_hw_watchpoint_tests_p } { + if {$type =3D=3D "hw" && !$allow_hw_watchpoint_tests_p } { return } =20 diff --git a/gdb/testsuite/gdb.mi/pr11022.exp b/gdb/testsuite/gdb.mi/pr1102= 2.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 . =20 -require !skip_hw_watchpoint_tests +require allow_hw_watchpoint_tests =20 load_lib mi-support.exp set MIFLAGS "-i=3Dmi" 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. =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 load_lib gdb-python.exp =20 @@ -283,13 +283,13 @@ proc_with_prefix test_hardware_breakpoints { } { =20 proc_with_prefix test_watchpoints { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 # Start with a fresh gdb. clean_restart ${testfile} =20 # 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" "" } =20 @@ -307,13 +307,13 @@ proc_with_prefix test_watchpoints { } { =20 proc_with_prefix test_bkpt_internal { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 # Start with a fresh gdb. clean_restart ${testfile} =20 # 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 { } { =20 proc_with_prefix test_bkpt_eval_funcs { } { global srcfile testfile hex decimal - global skip_hw_watchpoint_tests_p + global allow_hw_watchpoint_tests_p =20 # Start with a fresh gdb. clean_restart ${testfile} =20 # 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/g= db/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. =20 proc test_detach_watch {wp multi_process cmd} { - if { $wp =3D=3D "hw" && [skip_hw_watchpoint_tests] } { + if { $wp =3D=3D "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 =20 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable [list debug "incdir=3D${objdir}"]] !=3D "" } { 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 @@ =20 # Test case for forgotten hw-watchpoints after fork()-off of a process. =20 -# 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. =20 -set skip_hw_watchpoint_tests_p [skip_hw_watchpoint_tests] +set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] =20 set testfile watchpoint-fork =20 @@ -29,7 +29,7 @@ set testfile watchpoint-fork set debug 0 =20 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} { =20 clean_restart $executable =20 - 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} { =20 # threads =20 - 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/gd= b.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 =20 # 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 =20 standard_testfile if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" ex= ecutable [list debug "additional_flags=3D-DNR_THREADS=3D$NR_THREADS -DX_INC= R_COUNT=3D$X_INCR_COUNT"]] !=3D "" } { diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/g= db.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 =20 standard_testfile if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" ex= ecutable [list debug "additional_flags=3D-DNR_THREADS=3D$NR_THREADS -DNR_TR= IGGERS_PER_THREAD=3D$NR_TRIGGERS_PER_THREAD"]] !=3D "" } { 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 } =20 -# Return a 1 if we should skip tests that require hardware watchpoints +# Return a 1 if we should run tests that require hardware watchpoints =20 -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 } =20 # 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 } =20 - return 1 + return 0 } =20 # Return a 1 if we should run tests that require *multiple* hardware # watchpoints to be active at the same time =20 proc allow_hw_watchpoint_multi_tests {} { - if { [skip_hw_watchpoint_tests] } { + if { ![allow_hw_watchpoint_tests] } { return 0 } =20 @@ -4084,7 +4084,7 @@ proc allow_hw_watchpoint_multi_tests {} { # Return a 1 if we should run tests that require read/access watchpoints =20 proc allow_hw_watchpoint_access_tests {} { - if { [skip_hw_watchpoint_tests] } { + if { ![allow_hw_watchpoint_tests] } { return 0 }