From owner-freebsd-hackers Thu Nov 7 10:42:21 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F8E237B404 for ; Thu, 7 Nov 2002 10:42:19 -0800 (PST) Received: from host2.rila.bg (host2.rila.bg [62.73.64.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CCEB43E75 for ; Thu, 7 Nov 2002 10:42:11 -0800 (PST) (envelope-from Dimitar.Peikov@rila.com) Received: from mobilin.rila.bg ([192.168.202.57]) by host2.rila.bg with Microsoft SMTPSVC(5.0.2195.5329); Thu, 7 Nov 2002 20:41:51 +0200 Received: from mobilin.rila.bg (localhost [127.0.0.1]) by mobilin.rila.bg (8.12.2/8.12.2/SuSE Linux 0.6) with ESMTP id gA7Igx80027368 for ; Thu, 7 Nov 2002 20:42:59 +0200 Received: from localhost (localhost [[UNIX: localhost]]) by mobilin.rila.bg (8.12.2/8.12.2/Submit) id gA7Ignge027367 for freebsd-hackers@freebsd.org; Thu, 7 Nov 2002 20:42:49 +0200 Content-Type: text/plain; charset="us-ascii" From: Dimitar Peikov Reply-To: mitko@rila.bg Organization: RILA Solutions To: freebsd-hackers@freebsd.org Subject: Threading debugging Date: Thu, 7 Nov 2002 20:42:38 +0200 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211072042.48407.mitko@rila.bg> X-OriginalArrivalTime: 07 Nov 2002 18:41:51.0336 (UTC) FILETIME=[5621C680:01C2868D] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I'm traying to debug a fork()-ing process, and according the GDB manual p= ages=20 setting the 'follow-fork-mode' to 'child' will cause to switch to childre= n.=20 So this could be the case if I'm attached to some process in GDB but in c= ase=20 that I'm debugging the master application I'm always staying in parent=20 process. Here are the details : bash-2.04$ uname -a FreeBSD yo.rila.bg 4.6-STABLE FreeBSD 4.6-STABLE #1: Thu Oct 10 15:39:15 = EEST=20 2002 root@yo.rila.bg:/usr/obj/usr/src/sys/YO i386 $ gdb blah (gdb) set follow-fork-mode child Debugger response to a program call of fork or vfork is "child". (gdb) n / several times to reach the fork() call / 428 pid =3D fork(); (gdb) 429 if (pid !=3D 0) { (gdb) p pid $2 =3D 12886 (gdb) Any comments would be greatfuly appreciated. - --=20 Dimitar Peikov Programmer Analyst Globalization Group "We Build e-Business" =20 RILA Solutions =20 27 Building, Acad.G.Bonchev Str. =20 1113 Sofia, Bulgaria =20 phone: (+359 2) 9797320=20 phone: (+359 2) 9797300=20 fax: (+359 2) 9733355 =20 http://www.rila.com=20 GnuPG key http://earth.rila.bg/~mitko/mitko.key.asc GnuPG key http://www.bgzone.com/~mitko/mitko.key.asc Key fingerprint 97AF 6192 78E2 AC68 FD56 CCB0 68B9 DF7D B3C1 9ED7 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9yrQoaLnffbPBntcRAj5ZAKC9kTl7OlTnOZlluZtSxUJPIdRTBgCgpymJ aq+isKvIF3GnGL9W/GikOwM=3D =3Dojrs -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message