我正在我的一个模块上运行kmemleak来查找泄漏,下面是一段时间后的结果。 从结果来看,我所理解的是地址是.ko或.o文件中的对象/地址。
unreferenced object 0xffff8803c9708f10 (size 32):
comm "resiter_access_i_o", pid 2320, jiffies 4294798486
hex dump (first 32 bytes):
d8 8e 70 c9 03 88 ff ff a0 8e 70 c9 03 88 ff ff ..p.......p.....
68 8e 70 c9 03 88 ff ff 30 8e 70 c9 03 88 ff ff h.p.....0.p.....
backtrace:
[<ffffffff81516e3e>] kmemleak_alloc+0x5e/0xd0
[<ffffffff8117cf2a>] __kmalloc+0x1ea/0x330
[<ffffffffa04cafbb>] 0xffffffffa04cafbb
[<ffffffffa04ad3a0>] 0xffffffffa04ad3a0
[<ffffffffa04ae8fb>] 0xffffffffa04ae8fb
[<ffffffffa0422e3a>] 0xffffffffa0422e3a
[<ffffffffa0423022>] 0xffffffffa0423022
[<ffffffff81096e86>] kthread+0x96/0xa0
[<ffffffff8100c20a>] child_rip+0xa/0x20
[<ffffffffffffffff>] 0xffffffffffffffff
根据我的理解,我使用gdb执行以下操作来查找相应的功能 但我得到以下错误
gdb resiter_access_i_o.ko
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from resiter_access_i_o.ko ...done.
(gdb) info symbol 0xffffffffa04ae8fb
No symbol matches 0xffffffffa04ae8fb.
(gdb) q
有人能指出我如何找出与上述地址对应的功能?提前谢谢......
答案 0 :(得分:0)
为什么不尝试像object dump,crashdum,crashtool等工具。 您应该可以轻松地从这些工具和您拥有的对象中找到函数名称