Debugging child process created by fork() with GDB

set follow-fork-mode <mode>

mode should be parent(default) or child.
If you set mode to child, the new process is debugged after a fork.

show follow-fork-mode

displays the current mode.

Source: Forks - Debugging with GDB

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.