Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2003 10:32:02 -0500
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        Jesse Guardiani <jesse@wingnet.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: apm problem and kernel debugging
Message-ID:  <20031205153202.GA1307@crodrigues.org>
In-Reply-To: <bqq7lk$kjp$1@sea.gmane.org>
References:  <bqq7lk$kjp$1@sea.gmane.org>

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



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