diff mbox

[commit] Always respect no_hardware_watchpoints in py-breakpoint.c (fwd)

Message ID 201107221756.p6MHultU018436@d06av02.portsmouth.uk.ibm.com
State Accepted
Headers show

Commit Message

Ulrich Weigand July 22, 2011, 5:56 p.m. UTC
http://sourceware.org/ml/gdb-patches/2011-07/msg00637.html

ChangeLog:

	* gdb.python/py-breakpoint.exp: Re-set can-use-hw-watchpoints
	flag after restarting GDB if necessary.
diff mbox

Patch

Index: gdb/testsuite/gdb.python/py-breakpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-breakpoint.exp,v
retrieving revision 1.10
diff -u -p -r1.10 py-breakpoint.exp
--- gdb/testsuite/gdb.python/py-breakpoint.exp	14 Mar 2011 16:09:55 -0000	1.10
+++ gdb/testsuite/gdb.python/py-breakpoint.exp	22 Jul 2011 17:34:25 -0000
@@ -186,6 +186,10 @@  gdb_test "continue" ".*\[Ww\]atchpoint.*
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
+# Disable hardware watchpoints if necessary.
+if [target_info exists gdb,no_hardware_watchpoints] {
+    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
+}
 if ![runto_main] then {
     fail "Cannot run to main."
     return 0
@@ -201,6 +205,10 @@  gdb_test "continue" ".*\[Ww\]atchpoint.*
 # Start with a fresh gdb.
 clean_restart ${testfile}
 
+# Disable hardware watchpoints if necessary.
+if [target_info exists gdb,no_hardware_watchpoints] {
+    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
+}
 if ![runto_main] then {
     fail "Cannot run to main."
     return 0