From: Tom Tromey Date: Sun, 8 Jan 2023 18:40:32 +0000 (-0700) Subject: Rename to allow_hw_watchpoint_tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e379cbb128e3e672af03bdbb97e6e4085925d1bc;p=binutils-gdb.git Rename to allow_hw_watchpoint_tests This changes skip_hw_watchpoint_tests to invert the sense, and renames it to allow_hw_watchpoint_tests. --- 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 }