* lib/gdb.exp (skip_hw_breakpoint_tests): New procedure.
(skip_hw_watchpoint_tests): Likewise. (skip_hw_watchpoint_multi_tests): Likewise. (skip_hw_watchpoint_access_tests): Likewise. * gdb.base/hbreak.exp: Use appropriate skip_hw_..._tests checks. * gdb.base/pr11022.exp: Likewise. * gdb.base/watch-read.exp: Likewise. * gdb.base/watch_thread_num.exp: Likewise. * gdb.base/watchpoint-hw-hit-once.exp: Likewise. * gdb.base/watchpoint-hw.exp: Likewise. * gdb.base/watchpoint.exp: Likewise. * gdb.threads/local-watch-wrong-thread.exp: Likewise. * gdb.threads/watchthreads-reorder.exp: Likewise. * gdb.threads/watchthreads.exp: Likewise. * gdb.threads/watchthreads2.exp: Likewise.
This commit is contained in:
parent
e25b2cfa2a
commit
b800ec70e3
13 changed files with 114 additions and 40 deletions
|
@ -1,3 +1,22 @@
|
||||||
|
2011-02-21 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
|
* lib/gdb.exp (skip_hw_breakpoint_tests): New procedure.
|
||||||
|
(skip_hw_watchpoint_tests): Likewise.
|
||||||
|
(skip_hw_watchpoint_multi_tests): Likewise.
|
||||||
|
(skip_hw_watchpoint_access_tests): Likewise.
|
||||||
|
|
||||||
|
* gdb.base/hbreak.exp: Use appropriate skip_hw_..._tests checks.
|
||||||
|
* gdb.base/pr11022.exp: Likewise.
|
||||||
|
* gdb.base/watch-read.exp: Likewise.
|
||||||
|
* gdb.base/watch_thread_num.exp: Likewise.
|
||||||
|
* gdb.base/watchpoint-hw-hit-once.exp: Likewise.
|
||||||
|
* gdb.base/watchpoint-hw.exp: Likewise.
|
||||||
|
* gdb.base/watchpoint.exp: Likewise.
|
||||||
|
* gdb.threads/local-watch-wrong-thread.exp: Likewise.
|
||||||
|
* gdb.threads/watchthreads-reorder.exp: Likewise.
|
||||||
|
* gdb.threads/watchthreads.exp: Likewise.
|
||||||
|
* gdb.threads/watchthreads2.exp: Likewise.
|
||||||
|
|
||||||
2011-02-21 Joel Brobecker <brobecker@adacore.com>
|
2011-02-21 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* gdb.ada/packed_array.exp: Add xfail for "print u_var" if
|
* gdb.ada/packed_array.exp: Add xfail for "print u_var" if
|
||||||
|
|
|
@ -13,12 +13,8 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
if {[skip_hw_breakpoint_tests]} {
|
||||||
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
return 0
|
||||||
&& ![istarget "ia64-*-*"])
|
|
||||||
|| [target_info exists gdb,no_hardware_watchpoints]} then {
|
|
||||||
verbose "Skipping hbreak test."
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set test hbreak
|
set test hbreak
|
||||||
|
|
|
@ -17,10 +17,8 @@ if $tracelevel then {
|
||||||
strace $tracelevel
|
strace $tracelevel
|
||||||
}
|
}
|
||||||
|
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
if {[skip_hw_watchpoint_tests]} {
|
||||||
# This test requires HW watchpoints
|
return 0
|
||||||
untested pr11022.exp
|
|
||||||
return -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfile "pr11022"
|
set testfile "pr11022"
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
set testfile "watch-read"
|
set testfile "watch-read"
|
||||||
set srcfile ${testfile}.c
|
set srcfile ${testfile}.c
|
||||||
|
|
||||||
if { [target_info exists gdb,no_hardware_watchpoints] } {
|
if {[skip_hw_watchpoint_access_tests]} {
|
||||||
untested ${testfile}.exp
|
return 0
|
||||||
return -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
|
||||||
|
|
|
@ -25,8 +25,8 @@ if $tracelevel then {
|
||||||
|
|
||||||
# This test verifies that a watchpoint is detected in the proper thread
|
# This test verifies that a watchpoint is detected in the proper thread
|
||||||
# so the test is only meaningful on a system with hardware watchpoints.
|
# so the test is only meaningful on a system with hardware watchpoints.
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
if {[skip_hw_watchpoint_tests]} {
|
||||||
return 0;
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfile watch_thread_num
|
set testfile watch_thread_num
|
||||||
|
|
|
@ -13,12 +13,8 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
if {[skip_hw_watchpoint_access_tests]} {
|
||||||
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
return 0
|
||||||
&& ![istarget "ia64-*-*"])
|
|
||||||
|| [target_info exists gdb,no_hardware_watchpoints]} then {
|
|
||||||
verbose "Skipping watchpoint-hw-hit-once test."
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set test watchpoint-hw-hit-once
|
set test watchpoint-hw-hit-once
|
||||||
|
|
|
@ -13,12 +13,9 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
|
|
||||||
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
if {[skip_hw_watchpoint_tests]} {
|
||||||
&& ![istarget "ia64-*-*"] && ![istarget "s390*-*-*"])
|
return 0
|
||||||
|| [target_info exists gdb,no_hardware_watchpoints]} then {
|
|
||||||
verbose "Skipping watchpoint-hw test."
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfile watchpoint-hw
|
set testfile watchpoint-hw
|
||||||
|
|
|
@ -688,10 +688,10 @@ proc test_inaccessible_watchpoint {} {
|
||||||
"$watchpoint_msg \[0-9\]+: \-location: \\*global_ptr"
|
"$watchpoint_msg \[0-9\]+: \-location: \\*global_ptr"
|
||||||
delete_breakpoints
|
delete_breakpoints
|
||||||
|
|
||||||
# This step requires two HW watchpoints. Since PPC Server only has
|
# This step requires two HW watchpoints. Since some platforms only
|
||||||
# a single one, it will use a SW watchpoint in this case.
|
# have a single one, accept either SW or HW watchpoint in this case.
|
||||||
if [istarget powerpc64-*] {
|
if {[skip_hw_watchpoint_multi_tests]} {
|
||||||
set watchpoint_msg "Watchpoint"
|
set watchpoint_msg "(Watchpoint|Hardware watchpoint)"
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_test "watch *global_ptr" "$watchpoint_msg \[0-9\]+: \\\*global_ptr"
|
gdb_test "watch *global_ptr" "$watchpoint_msg \[0-9\]+: \\\*global_ptr"
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
# thread other than the thread the local watchpoint was set in stops
|
# thread other than the thread the local watchpoint was set in stops
|
||||||
# for a breakpoint.
|
# for a breakpoint.
|
||||||
|
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
if {[skip_hw_watchpoint_multi_tests]} {
|
||||||
return 0;
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfile "local-watch-wrong-thread"
|
set testfile "local-watch-wrong-thread"
|
||||||
|
|
|
@ -25,9 +25,8 @@
|
||||||
# could be assigned during continuation of a thread with pending SIGTRAP to the
|
# could be assigned during continuation of a thread with pending SIGTRAP to the
|
||||||
# different/new watchpoint, just based on the watchpoint/debug register number.
|
# different/new watchpoint, just based on the watchpoint/debug register number.
|
||||||
|
|
||||||
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
|
if {[skip_hw_watchpoint_access_tests]
|
||||||
&& ![istarget "ia64-*-*"])
|
|| [skip_hw_watchpoint_multi_tests]
|
||||||
|| [target_info exists gdb,no_hardware_watchpoints]
|
|
||||||
|| ![istarget *-*-linux*]} {
|
|| ![istarget *-*-linux*]} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ if $tracelevel {
|
||||||
|
|
||||||
# This test verifies that a watchpoint is detected in the proper thread
|
# This test verifies that a watchpoint is detected in the proper thread
|
||||||
# so the test is only meaningful on a system with hardware watchpoints.
|
# so the test is only meaningful on a system with hardware watchpoints.
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
if {[skip_hw_watchpoint_multi_tests]} {
|
||||||
return 0;
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
proc target_no_stopped_data { } {
|
proc target_no_stopped_data { } {
|
||||||
|
|
|
@ -28,8 +28,8 @@ if $tracelevel {
|
||||||
|
|
||||||
# This test verifies that a watchpoint is detected in the proper thread
|
# This test verifies that a watchpoint is detected in the proper thread
|
||||||
# so the test is only meaningful on a system with hardware watchpoints.
|
# so the test is only meaningful on a system with hardware watchpoints.
|
||||||
if [target_info exists gdb,no_hardware_watchpoints] {
|
if {[skip_hw_watchpoint_tests]} {
|
||||||
return 0;
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
set testfile "watchthreads2"
|
set testfile "watchthreads2"
|
||||||
|
|
|
@ -1783,6 +1783,76 @@ proc skip_inline_var_tests {} {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Return a 1 if we should skip tests that require hardware breakpoints
|
||||||
|
|
||||||
|
proc skip_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
|
||||||
|
}
|
||||||
|
|
||||||
|
# These targets support hardware breakpoints natively
|
||||||
|
if { [istarget "i?86-*-*"]
|
||||||
|
|| [istarget "x86_64-*-*"]
|
||||||
|
|| [istarget "ia64-*-*"] } {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Return a 1 if we should skip tests that require hardware watchpoints
|
||||||
|
|
||||||
|
proc skip_hw_watchpoint_tests {} {
|
||||||
|
# Skip tests if requested by the board
|
||||||
|
if { [target_info exists gdb,no_hardware_watchpoints]} {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# These targets support hardware watchpoints natively
|
||||||
|
if { [istarget "i?86-*-*"]
|
||||||
|
|| [istarget "x86_64-*-*"]
|
||||||
|
|| [istarget "ia64-*-*"]
|
||||||
|
|| [istarget "powerpc*-*-linux*"]
|
||||||
|
|| [istarget "s390*-*-*"] } {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Return a 1 if we should skip tests that require *multiple* hardware
|
||||||
|
# watchpoints to be active at the same time
|
||||||
|
|
||||||
|
proc skip_hw_watchpoint_multi_tests {} {
|
||||||
|
if { [skip_hw_watchpoint_tests] } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# These targets support just a single hardware watchpoint
|
||||||
|
if { [istarget "powerpc*-*-linux*"] } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Return a 1 if we should skip tests that require read/access watchpoints
|
||||||
|
|
||||||
|
proc skip_hw_watchpoint_access_tests {} {
|
||||||
|
if { [skip_hw_watchpoint_tests] } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# These targets support just write watchpoints
|
||||||
|
if { [istarget "s390*-*-*"] } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
set compiler_info "unknown"
|
set compiler_info "unknown"
|
||||||
set gcc_compiled 0
|
set gcc_compiled 0
|
||||||
set hp_cc_compiler 0
|
set hp_cc_compiler 0
|
||||||
|
|
Loading…
Reference in a new issue