It is possible to define break-points that only work on a specific thread.
Use the 'break <location> thread <gdb thread number>'.
'info breakpoints' will show thread-specific break-points:
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x0804853f in thread_func
at c_threads_sleep.c:24 thread 6
stop only in thread 6
breakpoint already hit 2 times
Very useful if several threads use the same code, but we only want to
debug one of them.