I spent the last few days on improving debugging multithreaded programs with GDB under Linux. I now know more of more of the Linux threads implementation than I've ever wanted. And my conclusion is that it's completely broken. There is no other way to stop the program being debugged than to send a SIGSTOP to every sub-process in the program. And of course the kernel doesn't even tell you what those sub-processes are! Next time Linus starts telling that clone() is all you need ...