aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.c2
-rw-r--r--gdb/testsuite/gdb.threads/staticthreads.exp2
3 files changed, 8 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 83c57e0..51686d1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-06 Yao Qi <yao@codesourcery.com>
+
+ * gdb.threads/staticthreads.c (thread_function): Move the line
+ setting breakpoint on forward.
+ * gdb.threads/staticthreads.exp: Update comments.
+
2014-06-05 Ludovic Courtès <ludo@gnu.org>
* gdb.guile/scm-value.exp (test_value_in_inferior): Add test
diff --git a/gdb/testsuite/gdb.threads/staticthreads.c b/gdb/testsuite/gdb.threads/staticthreads.c
index 5c8eabe..db78063 100644
--- a/gdb/testsuite/gdb.threads/staticthreads.c
+++ b/gdb/testsuite/gdb.threads/staticthreads.c
@@ -38,7 +38,6 @@ thread_function (void *arg)
#ifdef HAVE_TLS
tlsvar = 2;
#endif
- printf ("Thread executing\n"); /* tlsvar-is-set */
while (sem_wait (&semaphore) != 0)
{
if (errno != EINTR)
@@ -47,6 +46,7 @@ thread_function (void *arg)
return NULL;
}
}
+ printf ("Thread executing\n"); /* tlsvar-is-set */
return NULL;
}
diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp
index 9fa625a..bdc03d4 100644
--- a/gdb/testsuite/gdb.threads/staticthreads.exp
+++ b/gdb/testsuite/gdb.threads/staticthreads.exp
@@ -105,7 +105,7 @@ if { "$have_tls" != "" } {
gdb_continue_to_breakpoint "tlsvar-is-set" ".* tlsvar-is-set .*"
gdb_test "p tlsvar" " = 2" "tlsvar in thread"
gdb_test "thread 1" ".*"
- # Unwind from pthread_join.
+ # Unwind to main.
gdb_test "up 10" " in main .*"
gdb_test "p tlsvar" " = 1" "tlsvar in main"
}