foreach_with_prefix always_inserted { "off" "on" } {
test_break $always_inserted "break"
- if {![skip_hw_breakpoint_tests]} {
+ if {[allow_hw_breakpoint_tests]} {
test_break $always_inserted "hbreak"
}
# coverage.
foreach always_inserted { "off" "on" } {
test_break $initial_load $always_inserted "break"
- if {![skip_hw_breakpoint_tests]} {
+ if {[allow_hw_breakpoint_tests]} {
test_break $initial_load $always_inserted "hbreak"
}
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_hw_breakpoint_tests]} {
- return 0
-}
+require allow_hw_breakpoint_tests
standard_testfile
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if {[skip_hw_breakpoint_tests]} {
- return 0
-}
+require allow_hw_breakpoint_tests
set test hbreak
set srcfile ${test}.c
# breakpoint locations as duplicate locations, which would lead to bad
# behavior. See PR gdb/25741.
-if {[skip_hw_breakpoint_tests]} {
- return 0
-}
+require allow_hw_breakpoint_tests
set test hbreak
set srcfile ${test}.c
global srcfile testfile hex decimal
# Skip these tests if the HW does not support hardware breakpoints.
- if { [skip_hw_breakpoint_tests] } { return 0 }
+ if { ![allow_hw_breakpoint_tests] } { return 0 }
# Start with a fresh gdb.
clean_restart ${testfile}
gdb_test "watch var" "atchpoint \[0-9\]+: var" "set the watchpoint"
# It is never hit but it should not be left over in the fork()ed-off child.
- if [skip_hw_breakpoint_tests] {
+ if {![allow_hw_breakpoint_tests]} {
set hbreak "break"
} else {
set hbreak "hbreak"
return 0
}
-# Return a 1 if we should skip tests that require hardware breakpoints
+# Return a 1 if we should run tests that require hardware breakpoints
-proc skip_hw_breakpoint_tests {} {
+proc allow_hw_breakpoint_tests {} {
# Skip tests if requested by the board (note that no_hardware_watchpoints
# disables both watchpoints and breakpoints)
if { [target_info exists gdb,no_hardware_watchpoints]} {
- return 1
+ return 0
}
# These targets support hardware breakpoints natively
|| [istarget "arm*-*-*"]
|| [istarget "aarch64*-*-*"]
|| [istarget "s390*-*-*"] } {
- return 0
+ return 1
}
- return 1
+ return 0
}
# Return a 1 if we should run tests that require hardware watchpoints