]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/debugscripts/README
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / debugscripts / README
1 $FreeBSD$
2
3 This directory contains gdb macros for kernel debugging.  When you
4 build a debug kernel, the target "gdbinit" in the kernel Makefile will
5 create the correct .gdbinit files in the kernel build directory.  To
6 perform 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
17 This directory also contains a kgdb script that given a crash dump number
18 automatically extract the path to the kernel source, run gdb to extract
19 information about kernel modules loaded, and then rerun gdb loading the
20 necessary symbols for the modules.  You need to make sure you build the
21 modules w/ debugging symbols separately to get things to work.