gdb 定位 oops call trace

[    1.454380] BUG: unable to handle kernel NULL pointer dereference at 00000000000005d0
[    1.474020] IP: [<ffffffff8144375b>] DSFW_rx_handle+0x1bb/0x370
[    1.487902] PGD 139c25067 PUD 135301067 PMD 0
[    1.497467] Oops: 0000 [#1] SMP
[    1.503342] Modules linked in:
[    1.508646] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 3.10.52-waf #133
[    1.524811] Hardware name: To be filled by O.E.M. To be filled by O.E.M./To be filled by O.E.M., BIOS 4.6.4 01/06/2012
[    1.552962] task: ffff88013b0c0ba0 ti: ffff88013b0d4000 task.ti: ffff88013b0d4000
[    1.571471] RIP: 0010:[<ffffffff8144375b>]  [<ffffffff8144375b>] DSFW_rx_handle+0x1bb/0x370
[    1.592629] RSP: 0018:ffff88013b0d5c98  EFLAGS: 00010202
[    1.604640] RAX: 00000000fffffffe RBX: ffff8801353c4d00 RCX: 00000000001978fd
[    1.622107] RDX: 0000000000000043 RSI: ffff88012bb00180 RDI: 00000000000005a8
[    1.639575] RBP: 00000000000005a8 R08: 0000000000016d20 R09: 0000000000000000
[    1.657043] R10: 0000000000000000 R11: ffff88011d1e2e2a R12: 0000000000000001
[    1.674511] R13: 0000000000020063 R14: ffff8801378ea3d0 R15: 000000000000003e
[    1.691981] FS:  0000000000000000(0000) GS:ffff88013fa00000(0000) knlGS:0000000000000000
[    1.712308] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    1.725618] CR2: 00000000000005d0 CR3: 00000001353c6000 CR4: 00000000000407b0
[    1.743085] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    1.760553] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[    1.778019] Stack:
[    1.780151]  ffff8801378ea3e0 ffffc90001cc3988 ffff8801353c4d00 ffffffff812b87f6
[    1.798609]  ffff88013b008900 ffff880137e87d00 ffff880137edc680 ffff88013b0d5d64
[    1.817064]  ffffc90001cc39b0 0001397200000100 ffff880137edc000 ffffffff814435a0
[    1.835520] Call Trace:
[    1.838954]  [<ffffffff812b87f6>] ? e1000e_clean_rx_irq_nff+0x256/0xbc0
[    1.854861]  [<ffffffff814435a0>] ? DSFW_fif_recv+0x70/0x70
[    1.867650]  [<ffffffff812b91ce>] ? e1000e_poll+0x6e/0x1c0
[    1.880179]  [<ffffffff81389a68>] ? net_rx_action+0x88/0x170
[    1.893228]  [<ffffffff81037f46>] ? __do_softirq+0xd6/0x290
[    1.906015]  [<ffffffff81038129>] ? run_ksoftirqd+0x29/0x40
[    1.918806]  [<ffffffff810591d3>] ? smpboot_thread_fn+0x103/0x190
[    1.933156]  [<ffffffff810590d0>] ? lg_global_unlock+0x60/0x60
[    1.946723]  [<ffffffff81052088>] ? kthread+0xb8/0xc0
[    1.957954]  [<ffffffff81051fd0>] ? __kthread_parkme+0x80/0x80
[    1.971522]  [<ffffffff814e121c>] ? ret_from_fork+0x7c/0xb0
[    1.984311]  [<ffffffff81051fd0>] ? __kthread_parkme+0x80/0x80
[    1.997877] Code: 00 48 98 48 c1 e0 06 01 90 f0 98 9d 81 83 80 f4 98 9d 81 01 48 85 ed 75 0f eb 4d 0f 1f 44 00 00 48 85 db 74 43 48 89 dd 48 89 ef <48> 8b 5d 28 e8 6c fd ff ff 85 c0 74 e8 8b 85 d4 00 00 00 83 f8
[    2.053478] RIP  [<ffffffff8144375b>] DSFW_rx_handle+0x1bb/0x370
[    2.067594]  RSP <ffff88013b0d5c98>
[    2.074145] CR2: 00000000000005d0

例如
[    2.053478] RIP  [<ffffffff8144375b>] DSFW_rx_handle+0x1bb/0x370

ffffffff8144375b 是指令在内存中的虚拟地址
DSFW_rx_handle  是函数(symbol 名)
0x1bb/0x370 ,0x370 是这个函数编译成机器码后的长度,0x1bb是ffffffff8144375b这条指令在相对于
DSFW_rx_handle 函数入口的偏移

gdb定位

# gdb vmlinux
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/wesley/dvlp/WAF/trunk/build/linux-3.10.52/vmlinux...done.
(gdb) l *DSFW_rx_handle+0x1bb/0x370

posted @ 2015-07-10 11:24  mull  阅读(1251)  评论(0编辑  收藏  举报