This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Respect gdb,no_hardware_watchpoints flags in new tests


Hello,

as I just noticed on a gdbserver spu-elf test run, a couple of recently added
tests neglect to respect the gdb,no_hardware_watchpoints flag.  Fixed by the
patch below.

Tested on spu-elf, committed to mainline.

Bye,
Ulrich


ChangeLog:

	* gdb.base/gdb11531.exp: Respect gdb,no_hardware_watchpoints flag.
	* gdb.base/watch-cond.exp: Likewise.
	* gdb.python/py-breakpoint.exp: Likewise.


Index: gdb/testsuite/gdb.base/gdb11531.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb11531.exp,v
retrieving revision 1.2
diff -u -p -r1.2 gdb11531.exp
--- gdb/testsuite/gdb.base/gdb11531.exp	5 May 2010 18:06:58 -0000	1.2
+++ gdb/testsuite/gdb.base/gdb11531.exp	18 Jun 2010 16:00:53 -0000
@@ -30,6 +30,10 @@ if { [prepare_for_testing $testfile.exp 
     return -1;
 }
 
+# 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 "run to main"
Index: gdb/testsuite/gdb.base/watch-cond.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watch-cond.exp,v
retrieving revision 1.2
diff -u -p -r1.2 watch-cond.exp
--- gdb/testsuite/gdb.base/watch-cond.exp	1 Jun 2010 21:29:21 -0000	1.2
+++ gdb/testsuite/gdb.base/watch-cond.exp	18 Jun 2010 16:00:53 -0000
@@ -26,6 +26,11 @@ if { [prepare_for_testing ${testfile}.ex
     return -1
 }
 
+# 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 "Can't run to main"
     return
@@ -41,6 +46,11 @@ gdb_test "continue" \
 
 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 "Can't run to main"
     return
@@ -56,6 +66,11 @@ gdb_test "continue" \
 
 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 "Can't run to main"
     return
Index: gdb/testsuite/gdb.python/py-breakpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-breakpoint.exp,v
retrieving revision 1.2
diff -u -p -r1.2 py-breakpoint.exp
--- gdb/testsuite/gdb.python/py-breakpoint.exp	11 Jun 2010 17:34:56 -0000	1.2
+++ gdb/testsuite/gdb.python/py-breakpoint.exp	18 Jun 2010 16:00:53 -0000
@@ -130,6 +130,11 @@ gdb_test "python print blist\[len(blist)
 # 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
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]