解释 MSVC++6 中的调试符号
您如何以像我这样的新手程序员能够理解的方式解释“符号”?
这些是什么? 它们是某种到函数的映射吗?
我想学习更高级的调试技术,而这个术语对我来说是一个障碍。
How would you explain "symbols" in a way that a novice programmer like myself would understand?
What are they? Are they some sort of mapping to functions?
I would like to learn more advanced debugging techniques and this term has been a roadblock for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于新手来说,一个可能比维基百科文章更简单的 MSVC++ 6 答案如下:
符号是正在调试的可执行文件与其源代码之间的链接,存储在 .PDB(符号信息)文件中。 如果我正在调试可执行文件,或者我的 EXE 崩溃并且我最终进入调试器,并且我有关联的符号信息,那么假设源代码可用,我将能够查看 C++ 源代码中发生的情况。 如果我没有此信息,我将看到 x86 汇编/机器代码。
因此,在测试机器上,向测试仪提供 PDB 和调试器通常是一个好主意,因为在发生崩溃时,您将能够找出发生的原因。 没有 PDB 和调试器,您将不得不在开发 PC 上重新创建崩溃,这可能很困难。
A possibly simpler MSVC++ 6 answer for a novice than the wikipedia article is as follows;
Symbols are links between an executable file being debugged and it's source, stored in a .PDB (symbolic information) file. If I am debugging an executable, or my EXE crashes and I end up in the debugger, and I have associated symbolic information, I will be able to view what's going on in terms of my C++ source code, assuming the source is available. If I don't have this information, I'll be shown x86 assembly / machine code.
For this reason, on test machines, it is often a good idea to supply the PDB and a debugger to the tester, as in the event of a crash, you'll be able to figure out why it happened. No PDB and debugger, and you'll have to recreate the crash on your development PC, which can be difficult.
试试这个:调试符号
Try this: Debug Symbols
为了让未来的搜索者可以更轻松地度过,我找到了一些关于该主题的优秀资源。
Just so future searchers can have an easier time, I found some great resources on the topic..