[commit] Fix status of supported watchpoints on s390(x)
Ulrich Weigand
uweigand@de.ibm.com
Fri Nov 27 16:15:00 GMT 2009
Hello,
on s390(x)-ibm-linux, kernel and hardware support only "write" hardware
watchpoints; neither "read"/"access" watchpoints nor hardware *breakpoints*
are supported.
The s390-nat.c:s390_can_use_hw_breakpoint routine incorrectly claimed to
support all kinds of hardware watchpoints/breakpoints -- the patch below
fixes this mistake.
The patch also removes s390*-*-* from the list of supported targets in
a couple of recently added testcases that specifically require one of
the unsupported watchpoint variants.
Tested on s390(x)-ibm-linux; committed to mainline.
Bye,
Ulrich
ChangeLog:
gdb/
* s390-nat.c (s390_can_use_hw_breakpoint): Only support breakpoints
of type bp_hardware_watchpoint.
gdb/testsuite/
* gdb.base/hbreak.exp: Disable for s390*-*-* targets.
* gdb.base/watchpoint-hw-hit-once.exp: Likewise.
* gdb.threads/watchthreads-reorder.exp: Likewise.
Index: gdb/s390-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/s390-nat.c,v
retrieving revision 1.29
diff -u -p -r1.29 s390-nat.c
--- gdb/s390-nat.c 11 Nov 2009 19:38:34 -0000 1.29
+++ gdb/s390-nat.c 27 Nov 2009 16:07:23 -0000
@@ -380,7 +380,7 @@ s390_remove_watchpoint (CORE_ADDR addr,
static int
s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
{
- return 1;
+ return type == bp_hardware_watchpoint;
}
static int
Index: gdb/testsuite/gdb.base/hbreak.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/hbreak.exp,v
retrieving revision 1.1
diff -u -p -r1.1 hbreak.exp
--- gdb/testsuite/gdb.base/hbreak.exp 7 Oct 2009 19:52:28 -0000 1.1
+++ gdb/testsuite/gdb.base/hbreak.exp 27 Nov 2009 16:07:23 -0000
@@ -15,7 +15,7 @@
# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
- && ![istarget "ia64-*-*"] && ![istarget "s390*-*-*"])
+ && ![istarget "ia64-*-*"])
|| [target_info exists gdb,no_hardware_watchpoints]} then {
verbose "Skipping hbreak test."
return
Index: gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp,v
retrieving revision 1.1
diff -u -p -r1.1 watchpoint-hw-hit-once.exp
--- gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp 20 Nov 2009 19:57:29 -0000 1.1
+++ gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp 27 Nov 2009 16:07:23 -0000
@@ -15,7 +15,7 @@
# Arch not supporting hw watchpoints does not imply no_hardware_watchpoints set.
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
- && ![istarget "ia64-*-*"] && ![istarget "s390*-*-*"])
+ && ![istarget "ia64-*-*"])
|| [target_info exists gdb,no_hardware_watchpoints]} then {
verbose "Skipping watchpoint-hw-hit-once test."
return
Index: gdb/testsuite/gdb.threads/watchthreads-reorder.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/watchthreads-reorder.exp,v
retrieving revision 1.1
diff -u -p -r1.1 watchthreads-reorder.exp
--- gdb/testsuite/gdb.threads/watchthreads-reorder.exp 20 Nov 2009 19:48:45 -0000 1.1
+++ gdb/testsuite/gdb.threads/watchthreads-reorder.exp 27 Nov 2009 16:07:23 -0000
@@ -26,7 +26,7 @@
# different/new watchpoint, just based on the watchpoint/debug register number.
if {(![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]
- && ![istarget "ia64-*-*"] && ![istarget "s390*-*-*"])
+ && ![istarget "ia64-*-*"])
|| [target_info exists gdb,no_hardware_watchpoints]
|| ![istarget *-*-linux*]} {
return 0
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list