Q:

Debugging a multithreaded program

While debugging a multithreaded c program using GDB, how do I find out the execution position of individual threads in situations like " the execution of a program hanging midway". 
Thanks

A:

Hit Contol-C to get the (gdb) prompt, and then thread apply all where.

