From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1630 invoked by alias); 7 Aug 2006 21:47:14 -0000 Received: (qmail 1620 invoked by uid 22791); 7 Aug 2006 21:47:14 -0000 X-Spam-Check-By: sourceware.org Received: from qb-out-0506.google.com (HELO qb-out-0506.google.com) (72.14.204.232) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Aug 2006 21:47:12 +0000 Received: by qb-out-0506.google.com with SMTP id a39so374084qbd for ; Mon, 07 Aug 2006 14:47:10 -0700 (PDT) Received: by 10.49.93.13 with SMTP id v13mr1852369nfl; Mon, 07 Aug 2006 14:47:09 -0700 (PDT) Received: from localhost ( [80.171.193.236]) by mx.gmail.com with ESMTP id x27sm6477787nfb.2006.08.07.14.47.08; Mon, 07 Aug 2006 14:47:09 -0700 (PDT) To: Richard Cc: gdb@sources.redhat.com Subject: Re: fork debugging : back to parent. References: <5693501.post@talk.nabble.com> <20060807210740.GA28579@nevyn.them.org> Date: Mon, 07 Aug 2006 21:47:00 -0000 In-Reply-To: <20060807210740.GA28579@nevyn.them.org> (Daniel Jacobowitz's message of "Mon, 7 Aug 2006 17:07:40 -0400") Message-ID: <87slk8xlpk.fsf@mail.com> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii From: Richard 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/msg00042.txt.bz2 I have version 6.5.5 just build and confirmed with "show version" ,---- | show version | GNU gdb 6.5.50.20060806 | Copyright (C) 2006 Free Software Foundation, Inc. | GDB is free software, covered by the GNU General Public License, and you are | welcome to change it and/or distribute copies of it under certain conditions. | Type "show copying" to see the conditions. | There is absolutely no warranty for GDB. Type "show warranty" for details. | This GDB was configured as "i686-pc-linux-gnu". | > `---- set follow-fork-mode to both is not supported: ,---- | >help set follow | Set debugger response to a program call of fork or vfork. | A fork or vfork creates a new process. follow-fork-mode can be: | parent - the original process is debugged after a fork | child - the new process is debugged after a fork | The unfollowed process will continue to run. | By default, the debugger will follow the parent process. | >set follow-fork-mode both | Undefined item: "both". | >set follow-fork-mode child | > `---- Sorry, if I'm missing something obvious. How owuld I browse "recent features" in CVS? Daniel Jacobowitz writes: > 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 > --