diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2011-02-21 14:57:38 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2011-02-21 14:57:38 +0000 |
commit | b800ec70e34b8115b645deea9f661a1769149c0a (patch) | |
tree | bd007a2df331da8862204f7cd4d5789b9967e343 /gdb/testsuite/gdb.base | |
parent | e25b2cfa2a4fb779f95971926973dd7b77901f81 (diff) | |
download | binutils-gdb-b800ec70e34b8115b645deea9f661a1769149c0a.tar.gz |
* 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.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/hbreak.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/pr11022.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watch-read.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watch_thread_num.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint-hw.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.exp | 8 |
7 files changed, 17 insertions, 31 deletions
diff --git a/gdb/testsuite/gdb.base/hbreak.exp b/gdb/testsuite/gdb.base/hbreak.exp index 7f797e3e930..7612bcceb4b 100644 --- a/gdb/testsuite/gdb.base/hbreak.exp +++ b/gdb/testsuite/gdb.base/hbreak.exp @@ -13,12 +13,8 @@ # You should have received a copy of the GNU General Public License # 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-*-*"] - && ![istarget "ia64-*-*"]) - || [target_info exists gdb,no_hardware_watchpoints]} then { - verbose "Skipping hbreak test." - return +if {[skip_hw_breakpoint_tests]} { + return 0 } set test hbreak diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp index 7115f22ae74..ec7bc33b887 100644 --- a/gdb/testsuite/gdb.base/pr11022.exp +++ b/gdb/testsuite/gdb.base/pr11022.exp @@ -17,10 +17,8 @@ if $tracelevel then { strace $tracelevel } -if [target_info exists gdb,no_hardware_watchpoints] { - # This test requires HW watchpoints - untested pr11022.exp - return -1 +if {[skip_hw_watchpoint_tests]} { + return 0 } set testfile "pr11022" diff --git a/gdb/testsuite/gdb.base/watch-read.exp b/gdb/testsuite/gdb.base/watch-read.exp index bf62987b674..052de8477ff 100644 --- a/gdb/testsuite/gdb.base/watch-read.exp +++ b/gdb/testsuite/gdb.base/watch-read.exp @@ -27,9 +27,8 @@ set testfile "watch-read" set srcfile ${testfile}.c -if { [target_info exists gdb,no_hardware_watchpoints] } { - untested ${testfile}.exp - return -1 +if {[skip_hw_watchpoint_access_tests]} { + return 0 } if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp index e9807465bc5..3a78edb9c3f 100644 --- a/gdb/testsuite/gdb.base/watch_thread_num.exp +++ b/gdb/testsuite/gdb.base/watch_thread_num.exp @@ -25,8 +25,8 @@ if $tracelevel then { # This test verifies that a watchpoint is detected in the proper thread # so the test is only meaningful on a system with hardware watchpoints. -if [target_info exists gdb,no_hardware_watchpoints] { - return 0; +if {[skip_hw_watchpoint_tests]} { + return 0 } set testfile watch_thread_num diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp index e560606fc65..171b89b506e 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp @@ -13,12 +13,8 @@ # You should have received a copy of the GNU General Public License # 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-*-*"] - && ![istarget "ia64-*-*"]) - || [target_info exists gdb,no_hardware_watchpoints]} then { - verbose "Skipping watchpoint-hw-hit-once test." - return +if {[skip_hw_watchpoint_access_tests]} { + return 0 } set test watchpoint-hw-hit-once diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp index 3925929649a..3706699037b 100644 --- a/gdb/testsuite/gdb.base/watchpoint-hw.exp +++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp @@ -13,12 +13,9 @@ # You should have received a copy of the GNU General Public License # 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-*-*"] - && ![istarget "ia64-*-*"] && ![istarget "s390*-*-*"]) - || [target_info exists gdb,no_hardware_watchpoints]} then { - verbose "Skipping watchpoint-hw test." - return + +if {[skip_hw_watchpoint_tests]} { + return 0 } set testfile watchpoint-hw diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 02df9a1c9cd..7450602075d 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -688,10 +688,10 @@ proc test_inaccessible_watchpoint {} { "$watchpoint_msg \[0-9\]+: \-location: \\*global_ptr" delete_breakpoints - # This step requires two HW watchpoints. Since PPC Server only has - # a single one, it will use a SW watchpoint in this case. - if [istarget powerpc64-*] { - set watchpoint_msg "Watchpoint" + # This step requires two HW watchpoints. Since some platforms only + # have a single one, accept either SW or HW watchpoint in this case. + if {[skip_hw_watchpoint_multi_tests]} { + set watchpoint_msg "(Watchpoint|Hardware watchpoint)" } gdb_test "watch *global_ptr" "$watchpoint_msg \[0-9\]+: \\\*global_ptr" |