Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
show follow-fork-mode Display the current debugger response to a fork
or vfork call.
If you ask to debug a child process and a vfork is followed by an exec, GDB executes
the new target up to the first breakpoint in the new target. If you have a breakpoint set
on main in your original program, the breakpoint will also be set on the child process's
main.
When a child process is spawned by vfork, you cannot debug the child or parent until
an exec call completes.
If you issue a run command to GDB after an exec call executes, the new target restarts.
To restart the parent process, use the file command with the parent executable name
as its argument.
You can use the catch command to make GDB stop whenever a fork, vfork, or
exec call is made. See “Setting catchpoints” (page 51).
4.10 Debugging programs with multiple processes 45