Add some info about OS X Time Machine
[ikiwiki.git] / docs / developer / KmodDebugging.mdwn
1 * Get your coredump.
2
3
4 * Start kgdb: `kgdb /var/crash/kern.X /var/crash/vmcore.X`.
5
6
7 * Load some handy helper commands when you're at the kgdb prompt: `source /usr/src/test/debug/gdb.kernel`.
8
9
10 * Get the kld statistics from the kernel: `kldstat` at the kgdb prompt.
11
12
13 * Background kgdb (^Z).
14
15
16 * Execute a helper utility to create another gdb script: `asf -s /modules`.
17
18
19 * Paste the output from the kgdb 'kldstat' command above.
20
21
22 * Signal asf that you're ready (^D).
23
24
25 * Foreground kgdb again: `fg`.
26
27
28 * Load the gdb script created by asf above to load kmod symbols: `source .asf` at the kgdb prompt.
29
30
31 * Print, list, backtrace to your heart's content! Be sure to have debug symbols compiled with your modules though ;).
32