From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 01:40:03 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BAA8106566C for ; Wed, 11 Mar 2009 01:40:03 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id DE8768FC0A for ; Wed, 11 Mar 2009 01:40:02 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.localnet (Inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n2B1e0Lh011080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Mar 2009 12:10:00 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Wed, 11 Mar 2009 12:09:50 +1030 User-Agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1378409.BqRvBF0HU1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200903111209.58753.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: pluknet , vasanth raonaik Subject: Re: Debugging init process. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2009 01:40:03 -0000 --nextPart1378409.BqRvBF0HU1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 11 March 2009 06:43:50 pluknet wrote: > 2009/3/10 vasanth raonaik : > > Hello Team, > > > > I need to debug init process. I am not able to attach init to gdb and it > > throws > > That is because init is a system process, which you cannot trace by design > (see ptrace(2)). Interesting, but it doesn't really help him debug it ;) Unless there is some other way around it you can stop the kernel making it = a=20 system process by editing /usr/src/sys/kern/init_main.c around line 730 (in= =20 create_init). Although some signal code seems to specialcase PID 1 so maybe that won't wo= rk=20 either.. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1378409.BqRvBF0HU1 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBJtxZn5ZPcIHs/zowRAn8gAJ4rq4PGa9kAzjDnnz4XxTrSCcjwEQCgnV7U +4VAQgOGqgxyY9hVfcASiUQ= =EJg/ -----END PGP SIGNATURE----- --nextPart1378409.BqRvBF0HU1--