# test special commands (if, while, etc)
#
+# The skip_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]
+
standard_testfile
if { [prepare_for_testing "failed to prepare" commands run.c {debug additional_flags=-DFAKEARGV}] } {
proc_with_prefix watchpoint_command_test {} {
global gdb_prompt
+ global skip_hw_watchpoint_tests_p
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# Test 'set breakpoint condition-evaluation' settings
+# The skip_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]
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
#
proc test_watch { watch_command } {
global gdb_prompt
+ global skip_hw_watchpoint_tests_p
with_test_prefix "$watch_command" {
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
unsupported "no target support"
return
}
# display.exp Test display commands
# Also do some printing stuff for coverage's sake.
#
+
+# The skip_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]
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# 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
+# 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]
standard_testfile
}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# This file was written by Jeff Law. (law@cs.utah.edu)
+# The skip_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]
standard_testfile
proc recurse_tests {} {
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
- gdb_test_no_output "set can-use-hw-watchpoints 0" ""
+ global skip_hw_watchpoint_tests_p
+
+ if {$skip_hw_watchpoint_tests_p} {
+ gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
if [runto recurse] then {
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# The skip_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]
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# This file is part of the gdb testsuite
+# The skip_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]
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
}
# Disable hardware watchpoints if the target does not support them.
-if [target_info exists gdb,no_hardware_watchpoints] {
- gdb_test_no_output "set can-use-hw-watchpoints 0"
+if {$skip_hw_watchpoint_tests_p} {
+ gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
test_watch_location
# Test for watchpoints with conditions that involve inferior function
# calls.
+# The skip_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]
+
standard_testfile
if [target_info exists gdb,cannot_call_functions] {
"atchpoint \[0-9\]+: var\r\n\r\nOld value = 0\r\nNew value = 1\r\n.*watchpoint-stop.*"
}
-if { ![target_info exists gdb,no_hardware_watchpoints] } {
+if { !$skip_hw_watchpoint_tests_p } {
with_test_prefix "hw" { test_watchpoint 1 }
}
# Tests involving watchpoint conditions with local expressions.
#
+# The skip_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]
+
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
clean_restart ${testfile}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
clean_restart ${testfile}
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
"Watchpoint triggers after vfork ($teststr)"
}
-if { ![target_info exists gdb,no_hardware_watchpoints] } {
+if { ![skip_hw_watchpoint_tests] } {
test_watchpoint_across_vfork 1 "hw"
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# The skip_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]
+
#
# test running programs
#
+
if {[skip_shlib_tests]} {
return 0
}
runto_main
# Disable hardware watchpoints if necessary.
-if [target_info exists gdb,no_hardware_watchpoints] {
+if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# This file was written by Pierre Muller. (muller@ics.u-strasbg.fr)
+# The skip_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]
+
standard_testfile
clean_restart ${binfile}
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
# 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 [target_info exists gdb,no_hardware_watchpoints] {
+if [skip_hw_watchpoint_tests] {
return -1
}
# 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
+# 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]
+
load_lib mi-support.exp
set MIFLAGS "-i=mi"
upvar srcdir srcdir
upvar subdir subdir
upvar binfile binfile
+ global skip_hw_watchpoint_tests_p
- if {$type == "hw" && [target_info exists gdb,no_hardware_watchpoints] } {
+ if {$type == "hw" && $skip_hw_watchpoint_tests_p } {
return
}
# 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
+# 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]
+
load_lib gdb-python.exp
standard_testfile
proc_with_prefix test_watchpoints { } {
global srcfile testfile hex decimal
+ global skip_hw_watchpoint_tests_p
# Start with a fresh gdb.
clean_restart ${testfile}
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
clean_restart ${testfile}
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
if ![runto_main] then {
clean_restart ${testfile}
# Disable hardware watchpoints if necessary.
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
}
if ![runto_main] then {
# Test case for forgotten hw-watchpoints after fork()-off of a process.
+# The skip_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 testfile watchpoint-fork
# Set DEBUG to 0 or 1 in sources
set debug 0
proc test {type symbol} {
+ global skip_hw_watchpoint_tests_p
global debug
with_test_prefix "$type" {
global testfile subdir srcdir gdb_prompt
clean_restart $executable
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_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
# threads
- if [target_info exists gdb,no_hardware_watchpoints] {
+ if {$skip_hw_watchpoint_tests_p} {
# Watchpoint hits would get detected in unexpected threads.
return
}