1123709Sgrog$FreeBSD$ 2123709Sgrog 3123709SgrogThis directory contains gdb macros for kernel debugging. When you 4123709Sgrogbuild a debug kernel, the target "gdbinit" in the kernel Makefile will 5123709Sgrogcreate the correct .gdbinit files in the kernel build directory. To 6123709Sgrogperform kernel debugging, you would do: 7123709Sgrog 8123709Sgrog # cd /usr/obj/usr/src/sys/GENERIC (or name of kernel config) 9123709Sgrog # make gdbinit 10123709Sgrog # gdb kernel.debug 11123709Sgrog This GDB was configured as "i386-undermydesk-freebsd"... 12123709Sgrog Ready to go. Enter 'tr' to connect to remote target 13123709Sgrog and 'getsyms' after connection to load kld symbols. 14123709Sgrog (kgdb) 15123709Sgrog 16123709Sgrog 17133123SjmgThis directory also contains a kgdb script that given a crash dump number 18210641Suqsautomatically extract the path to the kernel source, run gdb to extract 19133123Sjmginformation about kernel modules loaded, and then rerun gdb loading the 20133123Sjmgnecessary symbols for the modules. You need to make sure you build the 21210641Suqsmodules w/ debugging symbols separately to get things to work. 22