* gdb.threads/wp-replication.c (main): Insert some code at the start
authorDoug Evans <dje@google.com>
Wed, 22 May 2013 16:30:24 +0000 (16:30 +0000)
committerDoug Evans <dje@google.com>
Wed, 22 May 2013 16:30:24 +0000 (16:30 +0000)
to ensure the breakpoint on main is only hit once.  Fix comment.

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

index 8d77b7d..300eb75 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-22  Doug Evans  <dje@google.com>
+
+       * gdb.threads/wp-replication.c (main): Insert some code at the start
+       to ensure the breakpoint on main is only hit once.  Fix comment.
+
 2013-05-21  Keith Seitz  <keiths@redhat.com>
            Pedro Alves  <palves@redhat.com>
 
index a0afab2..cac534e 100644 (file)
@@ -75,10 +75,14 @@ main ()
   pthread_t threads[NR_THREADS];
   int i;
 
+  /* Something to ensure that the breakpoint used to run to main
+     is only hit once.  */
+  empty_cycle ();
+
   while (watch_count_done == 0)
     {
-      /* GDB will modify the value of "i" at runtime and we will
-        get past this point.  */
+      /* GDB will modify the value of "watch_count_done" at runtime and we
+        will get past this point.  */
       empty_cycle ();
     }