When debugging multi-threaded C code using GDB, I usually refer to the entry in the gdb manual on "Debugging Programs with Multiple Threads". You can find it here.
It's not really a tutorial, but it does have a couple of examples that should get you started.