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