2013-07-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 8 Jul 2013 11:35:49 +0000 (11:35 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 8 Jul 2013 11:35:49 +0000 (11:35 +0000)
* gdb.threads/wp-replication.exp: Stop counting available hardware
watchpoints after NR_THREADS iterations.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/wp-replication.exp

index 8db2613..2c0f24b 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * gdb.threads/wp-replication.exp: Stop counting available hardware
+       watchpoints after NR_THREADS iterations.
+
 2013-07-08  Andrew Burgess  <aburgess@broadcom.com>
 
        * gdb.python/py-explore.exp: Add $gdb_prompt to test regexp.
index 8927a43..c6a13b9 100644 (file)
@@ -81,6 +81,14 @@ while { $done == 0 } {
   gdb_test_multiple "continue" "watchpoint created successfully" {
     -re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" {
       incr hwatch_count
+
+      # Some targets (like S/390) behave as though supporting
+      # unlimited hardware watchpoints.  In this case we just take a
+      # safe exit out of the loop.
+      if { $hwatch_count == $NR_THREADS } {
+       set done 1
+       break
+      }
     }
     -re ".*Could not insert hardware watchpoint.*$gdb_prompt $" {
       set done 1