aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/BUG-HUNTING
diff options
context:
space:
mode:
authorPekka Enberg <penberg@cs.helsinki.fi>2007-06-01 03:46:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-01 11:18:28 -0400
commit926b28984da035ac407e6b8f22ee8b4f94f51cf1 (patch)
tree81bd3124062c614d17650667b4401425365d8237 /Documentation/BUG-HUNTING
parent0a920b5b666d0be8141bd1ce620fffa7de96b81b (diff)
Documentation: How to use GDB to decode OOPSes
Adds instructions how to use GDB to figure out the exact location of an OOPS to Documentation/BUG-HUNTING. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/BUG-HUNTING')
-rw-r--r--Documentation/BUG-HUNTING24
1 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/BUG-HUNTING b/Documentation/BUG-HUNTING
index 65b97e1dbf70..35f5bd243336 100644
--- a/Documentation/BUG-HUNTING
+++ b/Documentation/BUG-HUNTING
@@ -191,6 +191,30 @@ e.g. crash dump output as shown by Dave Miller.
191> mov 0x8(%ebp), %ebx ! %ebx = skb->sk 191> mov 0x8(%ebp), %ebx ! %ebx = skb->sk
192> mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt 192> mov 0x13c(%ebx), %eax ! %eax = inet_sk(sk)->opt
193 193
194In addition, you can use GDB to figure out the exact file and line
195number of the OOPS from the vmlinux file. If you have
196CONFIG_DEBUG_INFO enabled, you can simply copy the EIP value from the
197OOPS:
198
199 EIP: 0060:[<c021e50e>] Not tainted VLI
200
201And use GDB to translate that to human-readable form:
202
203 gdb vmlinux
204 (gdb) l *0xc021e50e
205
206If you don't have CONFIG_DEBUG_INFO enabled, you use the function
207offset from the OOPS:
208
209 EIP is at vt_ioctl+0xda8/0x1482
210
211And recompile the kernel with CONFIG_DEBUG_INFO enabled:
212
213 make vmlinux
214 gdb vmlinux
215 (gdb) p vt_ioctl
216 (gdb) l *(0x<address of vt_ioctl> + 0xda8)
217
194Another very useful option of the Kernel Hacking section in menuconfig is 218Another very useful option of the Kernel Hacking section in menuconfig is
195Debug memory allocations. This will help you see whether data has been 219Debug memory allocations. This will help you see whether data has been
196initialised and not set before use etc. To see the values that get assigned 220initialised and not set before use etc. To see the values that get assigned