freebsd-dev/tools/debugscripts
Craig Rodrigues 749f65e3e3 Use print as a function for Python 3 [PEP 3105]
Import print_function from the __future__ module
to activate this for Python 2.  This works as far back as Python 2.6.0a2:
   https://docs.python.org/2/library/__future__.html

[PEP 3105] https://www.python.org/dev/peps/pep-3105/
2015-11-19 00:01:52 +00:00
..
dot.gdbinit A number of places in the source tree still reference cuad.* after 2012-12-08 22:16:36 +00:00
gdbinit.i386
gdbinit.kernel
kgdb
kld_deb.py Use print as a function for Python 3 [PEP 3105] 2015-11-19 00:01:52 +00:00
netstat-anr.gdb Remove debugging code that sneaked in. 2015-04-09 07:52:03 +00:00
README

$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.