From owner-freebsd-hackers Wed Jan 3 10:33:20 2001 From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 3 10:33:16 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (Postfix) with ESMTP id 84B0437B402 for ; Wed, 3 Jan 2001 10:33:15 -0800 (PST) Received: by gvr.gvr.org (Postfix, from userid 657) id E9F495848; Wed, 3 Jan 2001 19:33:13 +0100 (CET) Date: Wed, 3 Jan 2001 19:33:13 +0100 From: Guido van Rooij To: Thierry Cc: freebsd-hackers@freebsd.org Subject: Re: gdb question Message-ID: <20010103193313.A26389@gvr.gvr.org> References: <01010312453500.00430@FreeBSD.eicon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01010312453500.00430@FreeBSD.eicon.com>; from tjmsdn@ifrance.com on Wed, Jan 03, 2001 at 12:37:21PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Jan 03, 2001 at 12:37:21PM -0500, Thierry wrote: > > Hi, > > I use the "fork" function to call another function "foo( )" > > In gdb, I would like to put a breakpoint in this function "foo( )", When I > execute, the function "foo( )" is stopped, but gdb doesn't give me the hand. > > How I can put a breakpoint in a function call by a "fork" system ? If you exec after the fork you could do it with: gdb --exec=program1 --symbols=program2 if program1 exec program2. if you only fork you can use the set follow_fork_mode setting to follow the child. Hmm no that I check it, it does not seem to work though.... I am using a 4.1 stablish system though. Perhaps it does work on later systems. -Guido -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message