public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix hardware watchpoint check in test gdb.base/watchpoint-reuse-slot.exp
@ 2022-09-08 15:14 Carl Love
0 siblings, 0 replies; only message in thread
From: Carl Love @ 2022-09-08 15:14 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a47a2d45bd6b036d1fa0cde750380d73d0b6f493
commit a47a2d45bd6b036d1fa0cde750380d73d0b6f493
Author: Carl Love <cel@us.ibm.com>
Date: Thu Sep 8 15:13:03 2022 +0000
Fix hardware watchpoint check in test gdb.base/watchpoint-reuse-slot.exp
This test generates 48 failures on Power 9 when testing with HW watchpoints
enabled. Note HW watchpoint support is disabled on Power 9 due to a HW bug.
The skip_hw_watchpoint_tests proc must be used to correctly determine
if the processor supports HW watchpoints.
This patch replaces the [target_info exists gdb,no_hardware_watchpoints]
with the skip_hw_watchpoint_tests check.
This patch was tested on Power 9, Power 10 and X86-64 with no regressions.
Diff:
---
gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index e2ea137424b..7ea6a7467c9 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -22,6 +22,16 @@
# operation. (Note that we don't have any of these watchpoints
# trigger.)
+# 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]
+
+# starting the test.
+
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
@@ -285,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 { ![target_info exists gdb,no_hardware_watchpoints]} {
+if { !$skip_hw_watchpoint_tests_p } {
# Run test with H/W enabled.
setup_and_run_watchpoints_tests 1
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-08 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-08 15:14 [binutils-gdb] Fix hardware watchpoint check in test gdb.base/watchpoint-reuse-slot.exp Carl Love
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).