This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: fork debugging : back to parent.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Richard <rgrdev at gmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 7 Aug 2006 17:07:40 -0400
- Subject: Re: fork debugging : back to parent.
- References: <5693501.post@talk.nabble.com>
On Mon, Aug 07, 2006 at 01:21:02PM -0700, Richard (sent by Nabble.com) wrote:
>
> Below is the code from "Advanced programming in the Unix environment". if I
> set follow-fork to child, I can step ok to the exclp line. But how do I get
> back to debugging the parent process? Is it possible? I tried setting
> follow-fork back to "parent" and then "c"ontinuing but no joy. or do I have
> to specifically save process ids and reattach to the parent process?
Try using a recent version of GDB, and set follow-fork-mode to "both".
This was added in GDB 6.5.
--
Daniel Jacobowitz
CodeSourcery