Kernel debugging, 5.4-RELEASE

Mitch Parks mitch at kuoi.asui.uidaho.edu
Tue Aug 2 21:13:48 GMT 2005


man kgdb
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html

On Tue, 2 Aug 2005, dpk wrote:

> What method do kernel developers employ to debug kernel panics? The gdb
> that comes with 5.4-RELEASE does not have kernel debugging support and the
> handbook appears to be out of date with regards to KDB.
>
> I'm trying to use another gdb, out of ports, that has kernel debugging
> support but I'm getting the following results:
>
> /usr/ports/devel/gdb6/work/gdb+dejagnu-20040810/gdb/gdb -k kernel.debug
> GNU gdb 20040810 [GDB v6.x for FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "i386-portbld-freebsd5.4"...
> (kgdb) target remote /dev/cuaa0
> Remote debugging using /dev/cuaa0
> 0xc035646c in kdb_enter ()
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.
> warning: shared library handler failed to enable breakpoint
> (kgdb) bt
> #0  0xc035646c in kdb_enter ()
> #1  0xc033ea1f in panic ()
> #2  0xc0333181 in lockmgr ()
> #3  0xc038b08b in vop_stdunlock ()
> #4  0xc038af3b in vop_defaultop ()
> #5  0xc03010bb in spec_vnoperate ()
> #6  0xc0301648 in spec_write ()
> etc
>
> IE, it's not giving me any argument information.
>
> The target machine was booted with kernel.debug, an unstripped kernel
> built with -g. What additional steps do the kernel developers take to get
> the arguments?
>
> (Unfortunately I cannot get this machine to dump core to swap, so it has
> to be done over remote)

man kgdb
http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html

mitch at uidaho.edu


More information about the freebsd-stable mailing list