gdb堆栈奇怪 [英] gdb stack strangeness

查看:160
本文介绍了gdb堆栈奇怪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 (gdb)bt 
#0 0x00002b36465a5d4c在AY16_Loop_M16中(有时) )from /opt/intel/mkl/10.0.3.020/lib/em64t/libmkl_mc.so
#1 0x00000000000021da in ?? ()
#2 0x00000000000021da在? ()
#3 0xbf3e9dec2f04aeff在?? ()
#4 0xbf480541bd29306a在? ()
#5 0xbf3e6017955273e8在? ()
#6 0xbf442b937c2c1f37在? ()
#7 0x3f5580165832d744 in ?? ()
...

任何想法为什么我看不到符号?当然编译调试syms。
同一个会话在其他位置给出了符号。

解决方案

AY16_Loop_M16() code> in libmkl_mc.so 最有可能是用汇编语言编写的,并且没有正确的展开描述符,这是GDB在x86_64上正确展开堆栈所需的没有框架指针)。

最好的办法是联系英特尔,并要求他们添加适当的展开描述符。

如果您在 AY16_Loop_M16 的开始处设置断点,则可能获得更好的结果 - 如果从C(或任何其他非汇编语言)调用它,很有可能你会在进入时获得合理的堆栈跟踪。


I get this weird backtrace (sometimes):

(gdb) bt
#0  0x00002b36465a5d4c in AY16_Loop_M16 () from /opt/intel/mkl/10.0.3.020/lib/em64t/libmkl_mc.so
#1  0x00000000000021da in ?? ()
#2  0x00000000000021da in ?? ()
#3  0xbf3e9dec2f04aeff in ?? ()
#4  0xbf480541bd29306a in ?? ()
#5  0xbf3e6017955273e8 in ?? ()
#6  0xbf442b937c2c1f37 in ?? ()
#7  0x3f5580165832d744 in ?? ()
...

Any ideas why i cant see the symbols? Compiled with debugging syms of course. The same session gives symbols at other points.

解决方案

The AY16_Loop_M16() in libmkl_mc.so most likely was written in assembly, and does not have correct unwind descriptors, which are required for GDB to properly unwind stack on x86_64 (in the absence of frame pointers).

Your best bet is to contact Intel, and ask them to add proper unwind descriptors.

You may get better results if you set a breakpoint on the start of AY16_Loop_M16 -- if it is called from C (or any other non-assembly language), chances are you'll get a reasonable stack trace on entry.

这篇关于gdb堆栈奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆