From owner-freebsd-current@FreeBSD.ORG Fri Dec 5 07:29:36 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 172FF16A4CE for ; Fri, 5 Dec 2003 07:29:36 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2F5043FDF for ; Fri, 5 Dec 2003 07:29:33 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (rwcrmhc12) with ESMTP id <2003120515293201400bovele>; Fri, 5 Dec 2003 15:29:33 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])hB5FW2v4001375; Fri, 5 Dec 2003 10:32:03 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)hB5FW2QS001374; Fri, 5 Dec 2003 10:32:02 -0500 (EST) (envelope-from rodrigc) Date: Fri, 5 Dec 2003 10:32:02 -0500 From: Craig Rodrigues To: Jesse Guardiani Message-ID: <20031205153202.GA1307@crodrigues.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: apm problem and kernel debugging X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2003 15:29:36 -0000 On Fri, Dec 05, 2003 at 10:19:12AM -0500, Jesse Guardiani wrote: > So how do I make that backtrace include line numbers and > source code references? I'm assuming that's why nobody has > responded to my PR yet, and I'd like to provide as much > info as possible. (1) Read the man page for rc.conf, and look at the sections for dumpdir and dumpdev. Make sure you have at least dumpdev set in your /etc/rc.conf file. (2) The next time you get a problem and get kicked into the kernel debugger, type 't' to get a backtrace. After that, type 'panic'. That should save your vmcore file so that you can later debug with gdb. At this point you should reboot. (3) After you reboot, a vmcore file should be created in your dumpdir. At this point, you can do: gdb -k /usr/obj/usr/src/sys/[CONFIGFILE]/kernel.debug vmcore.0 (where CONFIGFILE is the name of your kernel config file) At this point, you can type "bt" to get a gdb backtrace of the kernel, which is more informative than ddb. You can read more about how to do all this stuff here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org