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 8db26137a7694f02d97c31470f1ff431ddee415b..2c0f24b76b3a3635a80621a2984898067e7bb3de 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 8927a434d2449ed785d862019d3b8e9c1d3db668..c6a13b9bc17d60c2e42972189df2b23aaced5bdf 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