Index of /freebsd/head/tools/debugscripts

      Name                    Last modified       Size  Description

[DIR] Parent Directory 28-Sep-2014 13:40 - [   ] dot.gdbinit 09-Dec-2012 04:48 4k [   ] gdbinit.i386 30-Dec-2011 04:59 9k [   ] gdbinit.kernel 27-Sep-2011 02:07 10k [   ] kgdb 27-Sep-2011 02:07 2k [   ] kld_deb.py 30-Dec-2011 04:59 5k

$FreeBSD: head/tools/debugscripts/README 210641 2010-07-30 11:58:18Z uqs $

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.