From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19830 invoked by alias); 7 Aug 2006 21:07:47 -0000 Received: (qmail 19822 invoked by uid 22791); 7 Aug 2006 21:07:47 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 07 Aug 2006 21:07:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GACK4-0007RH-53; Mon, 07 Aug 2006 17:07:40 -0400 Date: Mon, 07 Aug 2006 21:07:00 -0000 From: Daniel Jacobowitz To: Richard Cc: gdb@sources.redhat.com Subject: Re: fork debugging : back to parent. Message-ID: <20060807210740.GA28579@nevyn.them.org> Mail-Followup-To: Richard , gdb@sources.redhat.com References: <5693501.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5693501.post@talk.nabble.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00041.txt.bz2 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