how to debug a child process?

Andreas Schwab schwab@suse.de
Wed Jun 16 08:59:00 GMT 2004


Kai Zhu <kzhu@zhukai.net> 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.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
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