Monday, May 20, 2013

How to debug a child process using GDB?

show follow-fork-mode will give you which process you will follow after a fork by default. You can set this to parent/child using:
set follow-fork-mode <child/parent>

show detach-on-fork will tell you if we detach to one of the process after a fork. You can set this to on/off using:
set detach-on-fork <on/off>

No comments:

Post a Comment