old-cross-binutils/gdb/testsuite/gdb.threads
Yao Qi b8b91e982e Fix the race in gdb.threads/staticthreads.exp
The code in gdb.threads/staticthreads.exp about checking the value of
tlsvar in main thread is racy, because when child thread hits
breakpoint, the main thread may not go into pthread_join yet, and
may not be unwind to main.

This patch is to move the line setting breakpoint on after sem_wait,
so that the child thread will hit breakpoint after main thread calls
sem_post.  IOW, when child thread hits breakpoint, the main thread is
in either sem_post or pthread_join.  "up 10" can unwind main thread to
main.

gdb/testsuite:

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-06 09:45:22 +08:00
..
attach-into-signal.c
attach-into-signal.exp
attach-stopped.c
attach-stopped.exp
bp_in_thread.c
bp_in_thread.exp
clone-new-thread-event.c
clone-new-thread-event.exp
corethreads.c
corethreads.exp
create-fail.c
create-fail.exp
current-lwp-dead.c
current-lwp-dead.exp
dlopen-libpthread-lib.c
dlopen-libpthread.c
dlopen-libpthread.exp
execl.c
execl.exp
execl1.c
fork-child-threads.c
fork-child-threads.exp
fork-thread-pending.c
fork-thread-pending.exp
gcore-thread.exp
hand-call-in-threads.c
hand-call-in-threads.exp
ia64-sigill.c
ia64-sigill.exp
info-threads-cur-sal-2.c
info-threads-cur-sal.c
info-threads-cur-sal.exp
interrupted-hand-call.c
interrupted-hand-call.exp
killed.c
killed.exp
leader-exit.c
leader-exit.exp
linux-dp.c
linux-dp.exp
local-watch-wrong-thread.c
local-watch-wrong-thread.exp
Makefile.in
manythreads.c
manythreads.exp
multi-create.c
multi-create.exp
multiple-step-overs.c Handle multiple step-overs. 2014-03-20 13:43:28 +00:00
multiple-step-overs.exp Handle multiple step-overs. 2014-03-20 13:43:28 +00:00
no-unwaited-for-left.c
no-unwaited-for-left.exp
non-ldr-exc-1.c
non-ldr-exc-1.exp
non-ldr-exc-2.c
non-ldr-exc-2.exp
non-ldr-exc-3.c
non-ldr-exc-3.exp
non-ldr-exc-4.c
non-ldr-exc-4.exp
pending-step.c
pending-step.exp
print-threads.c
print-threads.exp
pthread_cond_wait.c
pthread_cond_wait.exp
pthreads.c
pthreads.exp
reconnect-signal.c
reconnect-signal.exp
schedlock.c
schedlock.exp
siginfo-threads.c
siginfo-threads.exp
signal-while-stepping-over-bp-other-thread.c Further cleanup of signal-while-stepping-over-bp-other-thread.c. 2014-03-20 14:09:53 +00:00
signal-while-stepping-over-bp-other-thread.exp Make signal-while-stepping-over-bp-other-thread.exp run against remote targets too. 2014-03-20 13:44:32 +00:00
sigstep-threads.c
sigstep-threads.exp
sigthread.c
sigthread.exp
staticthreads.c Fix the race in gdb.threads/staticthreads.exp 2014-06-06 09:45:22 +08:00
staticthreads.exp Fix the race in gdb.threads/staticthreads.exp 2014-06-06 09:45:22 +08:00
step-over-lands-on-breakpoint.c
step-over-lands-on-breakpoint.exp
step-over-trips-on-watchpoint.c Fix for even more missed events; eliminate thread-hop code. 2014-03-20 13:42:23 +00:00
step-over-trips-on-watchpoint.exp Fix for even more missed events; eliminate thread-hop code. 2014-03-20 13:42:23 +00:00
stepi-random-signal.c
stepi-random-signal.exp
switch-threads.c
switch-threads.exp
thread-execl.c
thread-execl.exp
thread-find.exp
thread-specific-bp.c
thread-specific-bp.exp enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
thread-specific.c
thread-specific.exp gdb.threads/thread-specific.exp: Fix uninitialized variable references 2014-03-21 23:51:16 +00:00
thread-unwindonsignal.exp
thread_check.c
thread_check.exp
thread_events.c
thread_events.exp
threadapply.c
threadapply.exp
threxit-hop-specific.c
threxit-hop-specific.exp
tls-main.c
tls-nodebug.c
tls-nodebug.exp
tls-shared.c
tls-shared.exp
tls-var-main.c
tls-var.c
tls-var.exp
tls.c
tls.exp
tls2.c
watchpoint-fork-child.c
watchpoint-fork-mt.c
watchpoint-fork-parent.c
watchpoint-fork-st.c
watchpoint-fork.exp
watchpoint-fork.h
watchthreads-reorder.c
watchthreads-reorder.exp
watchthreads.c
watchthreads.exp
watchthreads2.c
watchthreads2.exp
wp-replication.c
wp-replication.exp