freebsd-dev/tools/debugscripts
John-Mark Gurney cf02bf2407 add a set of scripts that I posted to -current last year. This makes
debugging kernels and kernel modules much easier.  It will automaticly
locate kernel source, extract kernel module information, and rerun gdb
to load kernel module symbol information (if available by compiling module
w/ debuging symbols).

I have not run these recently, so may need to be updated to work with
gdb6.  Feel free to fix as appropriate for -current.
2004-08-04 18:03:43 +00:00
..
dot.gdbinit Add comments to deter people from using this file directly. That's 2003-12-29 06:35:14 +00:00
gdbinit.i386 Remove calls to 'y' macro. 2003-12-30 02:08:29 +00:00
gdbinit.kernel Rename "msgbuf" to "dmesg", a more easily remembered name. 2003-12-31 00:37:24 +00:00
gdbinit.vinum Remove calls to 'y' macro. 2003-12-30 02:08:29 +00:00
kgdb add a set of scripts that I posted to -current last year. This makes 2004-08-04 18:03:43 +00:00
kld_deb.py add a set of scripts that I posted to -current last year. This makes 2004-08-04 18:03:43 +00:00
README add a set of scripts that I posted to -current last year. This makes 2004-08-04 18:03:43 +00:00

$FreeBSD$

This directory contains gdb macros for kernel debugging.  When you
build a debug kernel, the target "gdbinit" in the kernel Makefile will
create the correct .gdbinit files in the kernel build directory.  To
perform kernel debugging, you would do:

  # cd /usr/obj/usr/src/sys/GENERIC  (or name of kernel config)
  # make gdbinit
  # gdb kernel.debug
  This GDB was configured as "i386-undermydesk-freebsd"...
  Ready to go.  Enter 'tr' to connect to remote target
  and 'getsyms' after connection to load kld symbols.
  (kgdb) 


This directory also contains a kgdb script that given a crash dump number
automaticly extract the path to the kernel source, run gdb to extract
information about kernel modules loaded, and then rerun gdb loading the
necessary symbols for the modules.  You need to make sure you build the
modules w/ debugging symbols seperately to get things to work.