how to debug a child process?

Andreas Schwab
Wed Jun 16 08:59:00 GMT 2004

Kai Zhu <> writes:

> I guess (1) is related to the ways GDB interrupts a running process, which
> is understandable; but for (2), the GDB session will switch to the parent
> process and I cannot debug the child process at all.

Please try `set follow-fork-mode child'.


Andreas Schwab, SuSE Labs,
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

More information about the Gdb mailing list