如何理解Visual Studio的调用堆栈? [英] How to understand the call stack of Visual Studio?

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

问题描述

code> VCamD.ax!CFactoryTemplate :: CreateInstance()+ 0x3f bytes
> VCamD.ax!CClassFactory :: CreateInstance()+ 0x7f bytes

什么是 0x7f 0x3f

解决方案

被剥离的.pdb文件。他们的源代码文件和行号信息已被删除。例如,对于.pdb文件,您可以从Microsoft符号服务器获取。



哪个可以,无法获取源代码。没有行号信息,调试器返回到使用其的地址可用的最接近的符号,通常是功能入口点,并添加调用指令的偏移量。



如果长时间的代码缺少调试信息,有时您会收到虚假信息。 最接近的符号与原始代码无关。任何时候,偏移量都要大于,哦,0x200,那么你应该淡化所显示的符号名称的相关性。在Windows代码中有几个地方可以看到字符串变量的名称。您发布的堆栈跟踪信心很高,这些偏移量很小。


  VCamD.ax!CFactoryTemplate::CreateInstance()  + 0x3f bytes 
> VCamD.ax!CClassFactory::CreateInstance()  + 0x7f bytes 

What's 0x7f and 0x3f?

解决方案

You got .pdb files that were stripped. Their source code file and line number info was removed. Typical for example for .pdb files you can get from the Microsoft symbol server.

Which is okay, you can't get the source code anyway. Without the line number info, the debugger falls back to using the 'closest' symbol whose address it does have available, typically the function entry point, and adds the offset of the call instruction.

Sometimes you get bogus information if debug info is missing for long stretches of code. That 'closest' symbol is in no way related to the original code. Any time the offset gets to be larger than, oh, 0x200 then you ought to downplay the relevance of the displayed symbol name. There are a couple of places in the Windows code where you actually see the name of a string variable. The stack trace you posted has high confidence, those offsets are small.

这篇关于如何理解Visual Studio的调用堆栈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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