查找 C++ 的符号源文件
我有一个项目是C++ WIN32项目。我发现了一个问题 有些符号可以被windbg识别,但有些则不能。我不 知道为什么。 其特点是:
1)都是C++方法
2)两个函数都在一个.cpp文件中
3)两个函数在源文件中非常接近并且两者都不是 它们被 #ifdef 包围
4) 我已经使用 dbh.exe 来检查符号,符号在 Windbg 也不在 pdb 文件中。
我猜测符号丢失是否可能是由于继承的原因 班级? 请推荐,谢谢! 垃圾桶
I have a project that is C++ WIN32 project. I found a problem that
some symbol can be recognized by the windbg but some don't. I don't
know why.
The characteristics are:
1) both are C++ method
2) both function are in one .cpp file
3) the two functions are very close in the source file and neither of
them are enclosed by a #ifdef
4) I have used dbh.exe to check the symbol, the symbol missing in the
windbg is also not in the pdb file.
I am guessing if the symbol missing may due to the inheritance of the
class?
Please suggest, thanks!
Bin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果你不使用函数,只要它不是虚函数,它就可能被链接器deadstripped。未使用的全局数据对象也可能被删除。
If you don't use a function, as long as it is not a virtual function, it may be deadstripped by the linker. Unused global data objects may be deadstripped as well.
该函数是否被调用过?
提供更多关于为什么您认为这是“由于类的继承”的详细信息可能会有所帮助
Is the function ever called?
It might help to give some more details on why you think it is "due to the inheritance of the class"
听起来源代码可能与 PDB 文件不兼容。
也许该功能是在生成PDB文件后添加的?
您可以通过以下方式验证这一点:
我建议的第一件事是重建源代码,看看是否可以解决问题。
如果这不起作用,请提供更多信息,以便我们帮助您进一步诊断。
It sounds like the source code may be incompatible with the PDB files.
Maybe the function was added after the PDB file was generated?
You can validate this by:
The first thing I would suggest is to rebuild the source code to see if that fixes the problem.
If this doesn't work, please provide more information to allow us to help you diagnose this further.