14.13Debugging multiple processes ( programs with fork and vfork
calls)
14.13.1Ask mode for set follow-fork-mode
The ask command prompts the user to select between parent and child as the debugger response to a program call of fork/vfork. Based on the user selection, the parent or the child process is debugged.
For example,
(gdb) set
The debugger response to a program call to fork or vfork is ask.
(gdb) run Starting program: sample [New process 4941] Select
mode: [0] parent [1] child
14.13.2Serial mode for set follow-fork-mode
The option serial, for the
(gdb) set
The
•MxN threaded programs
•Parent process is
14.13.3Support for showing unwind info
The maint info unwind command prints the unwind information for the regions unwinded at the given address expression. Usage:
maint info unwind exp
where, exp is an address expression.
For example,
(gdb) maint info unwind $pc modsched:
0x4000930 .. 0x4000a20, end_prologue@0x4000970
Info block version:0x0, flags:0x0, length:4 * 4 == 16 0x40172b20: (0c) R1prologue rlen=12
0x40172b21: (e8) P7preds_when t=11
0x40172b23: (b1) P3preds_gr gr=41
0x40172b25: (ea) P7lc_when t=7
14.13 Debugging multiple processes ( programs with fork and vfork calls) 195