查找与机器地址匹配的源代码
我正在调试故障转储,并且很清楚进程在哪个地址崩溃。 源代码是用C#编写的。 我的问题是有什么快速方法可以找到与崩溃地址相关的匹配源代码吗?
I'm debugging a crash dump and I am clear at which address the process crashes. The source code is written in C#. My question is any quick way to find the matched source code related to the crash address?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
任何包含调试器的不错的 IDE 都会自动执行此操作。 否则,您通常需要在启用调试信息(调试符号)的情况下构建项目(不建议在生产中使用,因为它会使您的程序更大并且更容易进行逆向工程),并且调试器命令(例如 where 或 trace)将列出该程序您所在的线路。
Any decent IDE that includes a debugger will do this automatically. Otherwise, you typically need to build your project with debugging information (debug symbols) enabled (which isn't recommended for production, as it makes your program bigger and easier to reverse engineer), and debugger commands like where or trace will list the program lines you're at.
您需要构建中的符号文件 (.pdb)。
还启用 MS 的符号服务器,以便 VS 和 WinDBG 将自动获取正确的符号文件。
You need the symbol files (.pdb) from the build.
Also enable use of MS' symbol server so VS and WinDBG will automatically get the correct symbol files.
此博客是有关故障转储分析的有用信息的宝库。
这是开始调试 托管应用程序的故障转储 值得注意的是,它引用了以前的文章,并假设您已阅读并理解它们。 它还假设您稍微熟悉 Son of Strike,这是一个非常有用但有些神秘的调试扩展,用于处理托管代码。
this blog is a mine of useful information on crash dump analysis.
Here's where it starts on debugging a managed app's crash dump it is worth noting that it refers back to previous articles and assumes you have read and understood them. It also assumes you a slightly familiar with Son of Strike, an incredibly useful but somewhat arcane debugging extension for working with managed code.