This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fork debugging : back to parent.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]