Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2001 19:33:13 +0100
From:      Guido van Rooij <guido@gvr.org>
To:        Thierry <tjmsdn@ifrance.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: gdb question
Message-ID:  <20010103193313.A26389@gvr.gvr.org>
In-Reply-To: <01010312453500.00430@FreeBSD.eicon.com>; from tjmsdn@ifrance.com on Wed, Jan 03, 2001 at 12:37:21PM -0500
References:  <01010312453500.00430@FreeBSD.eicon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010103193313.A26389>