From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8003 invoked by alias); 10 Apr 2006 18:10:53 -0000 Received: (qmail 7989 invoked by uid 22791); 10 Apr 2006 18:10:52 -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, 10 Apr 2006 18:10:51 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FT0qe-0007hq-DS; Mon, 10 Apr 2006 14:10:48 -0400 Date: Mon, 10 Apr 2006 21:17:00 -0000 From: Daniel Jacobowitz To: PAUL GILLIAM Cc: gdb@sources.redhat.com Subject: Re: follow-fork and detach-on-fork should have one command Message-ID: <20060410181048.GA29568@nevyn.them.org> Mail-Followup-To: PAUL GILLIAM , gdb@sources.redhat.com References: <1144688788.10503.8.camel@dufur.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1144688788.10503.8.camel@dufur.beaverton.ibm.com> User-Agent: Mutt/1.5.8i 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-04/txt/msg00123.txt.bz2 On Mon, Apr 10, 2006 at 10:06:28AM -0700, PAUL GILLIAM wrote: > Currently follow-fork is yes or no and detach-on-fork is yes or no. > > It seems to me that it would be clearer if there was only one, with > three states "parent", "child", "both". > > Feel free to flame me if this has already been talked to death. (gdb) set follow-fork-mode yes Undefined item: "yes". (gdb) set follow-fork-mode no Undefined item: "no". (gdb) help set follow-fork 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. Once upon a time, there was a "both" item in this menu. It was supposed to spawn two GDBs, one attached to each. I think set detach-on-fork off is a reasonable behavior for "set follow-fork both". Michael, how about you? -- Daniel Jacobowitz CodeSourcery