1$FreeBSD$ 2 3This directory contains gdb macros for kernel debugging. When you 4build a debug kernel, the target "gdbinit" in the kernel Makefile will 5create the correct .gdbinit files in the kernel build directory. To 6perform kernel debugging, you would do: 7 8 # cd /usr/obj/usr/src/sys/GENERIC (or name of kernel config) 9 # make gdbinit 10 # gdb kernel.debug 11 This GDB was configured as "i386-undermydesk-freebsd"... 12 Ready to go. Enter 'tr' to connect to remote target 13 and 'getsyms' after connection to load kld symbols. 14 (kgdb) 15 16 17This directory also contains a kgdb script that given a crash dump number 18automaticly extract the path to the kernel source, run gdb to extract 19information about kernel modules loaded, and then rerun gdb loading the 20necessary symbols for the modules. You need to make sure you build the 21modules w/ debugging symbols seperately to get things to work. 22