“Gdb” is the debugger that I use extensively for my debugging purposes. Recently I came across a situation where I had to follow the child process and debug it. The GDB is good enough for that too 🙂
Gdb has an option named “follow-fork” which can be used in different ways.
By default, even if the program gets forked, the Gdb debugs only the parent process while the child process remains unimpeded. In order to debug the child process, we need to do:
set follow-fork-mode child
I made use of this command to debug the child process… 🙂
And, “show follow-fork-mode” displays the response of the current debugger to the fork call.