显示没有方法名称的调用堆栈 [英] Display callstack without method names

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

问题描述

在WinDbg中,我可以使用 k 命令获取调用堆栈。对于没有符号的DLL,它会显示错误的方法名称和较大的偏移量,例如

In WinDbg, I can get the callstack using the k command. For DLLs without symbols, it displays an incorrect method name and a large offset, e.g.

0018f9f0 77641148 syncSourceDll_x86!CreateTimerSyncBridge+0xc76a

由于我没有符号,因此我必须将此信息提供给DLL的开发人员。我不知道谁会处理该错误以及他有多少调试知识。我想避免开发人员认为问题出在CreateTimerSyncBridge()方法中。

Since I don't have symbols, I have to give this information to the developer of the DLL. I don't know who will work on the bug and how much debugging knowledge he has. I want to avoid that the developer thinks the problem is in the CreateTimerSyncBridge() method.

有没有一种方法可以在没有方法名称的情况下获取调用堆栈,只需使用

此刻,我正在使用以下解决方法:

At the moment I'm using the following workaround:

0:000> ? syncSourceDll_x86!CreateTimerSyncBridge+0xc76a
Evaluate expression: 1834469050 = 6d57c6ba
0:000> ? syncSourceDll_x86
Evaluate expression: 1834287104 = 6d550000
0:000> ? 6d57c6ba-6d550000
Evaluate expression: 181946 = 0002c6ba

所以我可以手动将调用堆栈修改为

So I can modify the callstack manually to

0018f9f0 77641148 syncSourceDll_x86!+0x2c6ba

但是对于很多线程中的许多帧来说,确实很难做到。

But that's really hard to do for a lot of frames in a lot of threads.

推荐答案

您可以使用更严格的评估来指定符号必须完全匹配,方法是使用命令行参数 -ses 启动windbg或发出命令:

You can specify that the symbols must match exactly using a stricter evaluation, either by starting windbg with command line parameter -ses or issuing the command:

.symopt + 0x400

如果调试器默认为false希望重设此选项,然后删除选项:

The default is false for the debugger, if you wish to reset this then just remove the option:

.symopt -0x400

请参阅msdn文档: https://msdn.microsoft.com/zh-cn/library/windows/hardware/ff558827(v = vs.85).aspx#symopt_exact_sym bols

See the msdn docs: https://msdn.microsoft.com/en-us/library/windows/hardware/ff558827(v=vs.85).aspx#symopt_exact_symbols

这篇关于显示没有方法名称的调用堆栈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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