opnsense-src/tools/debugscripts
Franco Fichtner 402e7dde73 src: initial commit based on FreeBSD-10.0
Taken from:	https://github.com/freebsd/freebsd.git
Commit id:	d44ce30d3054a38723f89a161c5e003e64d1aaae
2014-11-09 09:30:14 +01:00
..
dot.gdbinit src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
gdbinit.i386 src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
gdbinit.kernel src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
kgdb src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
kld_deb.py src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
README src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01: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
automatically 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 separately to get things to work.