diff options
| author | Richard Kennedy <richard@rsk.demon.co.uk> | 2008-02-06 04:38:01 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:09 -0500 |
| commit | dcc85cb61808098d22792db95f1dfa9c8b3bcf6d (patch) | |
| tree | 578e24baa2d6de390652f278e2c5a58b018e5816 | |
| parent | 844fcc53962d781aab7c164acbfa46505427375e (diff) | |
Documentation: add hint about call traces & module symbols to BUG-HUNTING
Here's a couple of small additions to BUG-HUNTING.
1. point out that you can list code in gdb with only one command
(gdb) l *(<symbol> + offset)
2. give a very brief hint how to decode module symbols in call traces
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | Documentation/BUG-HUNTING | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/BUG-HUNTING b/Documentation/BUG-HUNTING index 6c816751b868..65022a87bf17 100644 --- a/Documentation/BUG-HUNTING +++ b/Documentation/BUG-HUNTING | |||
| @@ -214,6 +214,23 @@ And recompile the kernel with CONFIG_DEBUG_INFO enabled: | |||
| 214 | gdb vmlinux | 214 | gdb vmlinux |
| 215 | (gdb) p vt_ioctl | 215 | (gdb) p vt_ioctl |
| 216 | (gdb) l *(0x<address of vt_ioctl> + 0xda8) | 216 | (gdb) l *(0x<address of vt_ioctl> + 0xda8) |
| 217 | or, as one command | ||
| 218 | (gdb) l *(vt_ioctl + 0xda8) | ||
| 219 | |||
| 220 | If you have a call trace, such as :- | ||
| 221 | >Call Trace: | ||
| 222 | > [<ffffffff8802c8e9>] :jbd:log_wait_commit+0xa3/0xf5 | ||
| 223 | > [<ffffffff810482d9>] autoremove_wake_function+0x0/0x2e | ||
| 224 | > [<ffffffff8802770b>] :jbd:journal_stop+0x1be/0x1ee | ||
| 225 | > ... | ||
| 226 | this shows the problem in the :jbd: module. You can load that module in gdb | ||
| 227 | and list the relevant code. | ||
| 228 | gdb fs/jbd/jbd.ko | ||
| 229 | (gdb) p log_wait_commit | ||
| 230 | (gdb) l *(0x<address> + 0xa3) | ||
| 231 | or | ||
| 232 | (gdb) l *(log_wait_commit + 0xa3) | ||
| 233 | |||
| 217 | 234 | ||
| 218 | Another very useful option of the Kernel Hacking section in menuconfig is | 235 | Another very useful option of the Kernel Hacking section in menuconfig is |
| 219 | Debug memory allocations. This will help you see whether data has been | 236 | Debug memory allocations. This will help you see whether data has been |
