linux 内核 栈 源码,linux – 内核堆栈跟踪到源代码行

给定带有调试符号的未剥离的vmlinux(通常包含与您的内核版本匹配的“linux-devel”或“linux-headers”包),您可以使用binutils附带的addr2line程序将地址转换为源文件中的行.

考虑这个呼叫追踪:

Call Trace:

[] ? finish_task_switch+0x3d/0x120

[] __schedule+0x3b0/0x9d0

[] schedule+0x29/0x70

[] schedule_hrtimeout_range_clock.part.24+0xdc/0xf0

[] ? hrtimer_get_res+0x50/0x50

[] ? schedule_hrtimeout_range_clock.part.24+0x7f/0xf0

[] schedule_hrtimeout_range_clock+0x19/0x60

[] schedule_hrtimeout_range+0x13/0x20

[] poll_schedule_timeout+0x49/0x70

[] do_sys_poll+0x423/0x550

[] ? sock_recvmsg+0x9c/0xd0

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] ? poll_select_copy_remaining+0x140/0x140

[] SyS_poll+0x5e/0x100

[] system_call_fastpath+0x16/0x1b

然后可以找到poll_select_copy_remaining中调用者的地址:

$addr2line -e /tmp/vmlinux ffffffff811a8c50

/tmp/linux-3.15-rc8/fs/select.c:209

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值