I am debugging a multithreaded application with gdb.
I can see the threads, and play switch / break with them, but sometimes when I am attached to a particular thread, some of the other threads print something.
How can I find out which thread is printing what part?