aboutsummaryrefslogtreecommitdiff
path: root/share/FAQ/kernel-debug.FAQ
blob: 0d098c3714bb5a0e636410ef9938c8c299c2507e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
                         Kernel debugging FAQ
                    for FreeBSD 1.1.5.1 and below

Last modified: $Id: kernel-debug.FAQ,v 1.1 1994/09/11 10:56:06 jkh Exp $

Here are some instructions for getting kernel debugging working on
a crash dump, it assumes that you have enough swap space for a crash
dump.

*** Start ***

Config you're kernel using config -g

Remove ${STRIP} -x $@; from the Makefile for the kernel so it doesn't
get stripped.

When the kernel's been built make a copy of it, say 386BSD.debug, and
then run strip -x on the original. Install the original as normal.

Now, after a crash dump, go to /sys/compile/WHATEVER and run kgdb. From kgdb
do:

symbol-file 386BSD.debug
exec-file /var/crash/system.0
core-file /var/crash/ram.0

and viola, you can debug the crash dump using the kernel sources just like
you can for any other program. 



  Paul Richards, FreeBSD core team member.