From owner-cvs-src@FreeBSD.ORG Mon Sep 12 05:30:08 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1100916A41F; Mon, 12 Sep 2005 05:30:08 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fileserver.fields.utoronto.ca (fileserver.fields.utoronto.ca [128.100.216.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C33843D46; Mon, 12 Sep 2005 05:30:07 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from fields.fields.utoronto.ca (fields.localdomain [192.168.216.11]) by fileserver.fields.utoronto.ca (8.12.8/8.12.8/Fields 6.0) with ESMTP id j8C5U40r008772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Sep 2005 01:30:04 -0400 Received: from obsecurity.dyndns.org (localhost.localdomain [127.0.0.1]) by fields.fields.utoronto.ca (8.12.8/8.12.8/Fields WS 6.0) with ESMTP id j8C5U16P030944; Mon, 12 Sep 2005 01:30:01 -0400 Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 0017A51233; Mon, 12 Sep 2005 01:30:00 -0400 (EDT) Date: Mon, 12 Sep 2005 01:30:00 -0400 From: Kris Kennaway To: "Greg 'groggy' Lehey" Message-ID: <20050912053000.GA28227@xor.obsecurity.org> References: <20050911002229.51F4916A471@hub.freebsd.org> <432382BC.5080105@root.org> <20050911022901.GA3090@xor.obsecurity.org> <20050912005134.GB2929@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <20050912005134.GB2929@wantadilla.lemis.com> User-Agent: Mutt/1.4.2.1i Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, Kris Kennaway , "David E. O'Brien" , cvs-all@FreeBSD.org, Nate Lawson , Garance A Drosihn Subject: Re: How to debug kernels (was: cvs commit: src/sys/conf kern.post.mk) X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 05:30:08 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2005 at 10:21:34AM +0930, Greg 'groggy' Lehey wrote: > On Saturday, 10 September 2005 at 22:29:02 -0400, Kris Kennaway wrote: > > On Sat, Sep 10, 2005 at 10:01:15PM -0400, Garance A Drosihn wrote: > >> At 6:05 PM -0700 9/10/05, Nate Lawson wrote: > >>> David E. O'Brien wrote: > >>>> obrien 2005-09-11 00:22:21 UTC > >>>> > >>>> FreeBSD src repository > >>>> > >>>> Modified files: > >>>> sys/conf kern.post.mk Log: > >>>> For HEAD, install a kernel with debug information if DEBUG is a ker= nel > >>>> config option. It is too easy to loose the build directory and not= have > >>>> symbols for kgdb to read. > >>>> Revision Changes Path > >>>> 1.84 +4 -17 src/sys/conf/kern.post.mk > >>> > >>> I disagree with this change. We do not need to waste the space > >>> in /. If I'm running a debug kernel, it is based on the latest > >>> version of kernel.debug in my kernel compile dir and I know to > >>> find it there. > >> > >> Fwiw, I've been burned by building a debug kernel, only to have > >> removed the original compile-directory for that kernel by the time I > >> actually *needed* the debug symbols. It's one thing if you're building > >> a debug kernel because you know you're going to spend the next hour > >> debugging some change. It's another if you're building a debug kernel > >> because your machine might panic sometime in the next two or three > >> weeks. > > > > Likewise, I also find this change very useful. When I'm juggling a > > few dozen panics on a few dozen machines with a few dozen different > > customized source trees, it's hard to keep track of all the > > kernel.debugs. Now I don't have to. >=20 > A lot must depend on how you use your debug kernel. One of the > biggest problems I've found is keeping the kernel and the sources in > sync. This change makes it more difficult. Also, the kernel build > can install debugging macros in the build directory; if you blow away > that directory, you've lost the macros too. >=20 > The method I use is described in > http://wwww.lemis.com/grog/Papers/Debug-tutorial/tutorial.pdf. > Basically, you debug from the kernel build directory and just pull in > the dump from /var/crash. I'm planning to present it again in Basel > in November, so if anybody disagrees with the approach, now is the > time to tell me. With this method, having symbols in the booted > kernel is a waste of time and space. Please reread my earlier posts for why this is a hindrance in my environment. Kris --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDJRJYWry0BWjoQKURAgyoAJ4xSzqAgQengXo7mH4pbVo39OSX8QCg9ehL rdgKNL780OW4hQ3aUpzjdA8= =rrMo -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--