如何匹配崩溃的“故障偏移”到源代码? [英] How to match a crash's "Fault offset" to the source code?
问题描述
我编译的EXE不断崩溃。当事件查看器崩溃时,我在事件查看器中有以下信息:
An EXE I compiled keeps crashing. I have the following info in the Event Viewer when it crashes:
异常代码:0xc0000008
故障偏移:0x00000000000cb8e8
Exception code: 0xc0000008
Fault offset: 0x00000000000cb8e8
如何将Fault offset与我的C ++代码进行匹配?在发布文件夹中有一个 .PDB
文件,只是不知道什么步骤来确定。
How do I match the "Fault offset" with my C++ code? There is a .PDB
file in the Release folder, just not sure what steps to figure this out.
推荐答案
你还需要知道偏移属于哪个模块,如果你得到0xC0000008( STATUS_INVALID_HANDLE
),那么异常可能会抛出ntdll.dll,这不会帮助你调试你的程序,因为你关心的是更深的堆栈。
You also need to know what module the offset belongs too, if you are getting 0xC0000008 (STATUS_INVALID_HANDLE
), then the exception is likely thrown from ntdll.dll, which isn't going to help you debug your program, since what you care about is deeper in the stack.
你应该做的是有你的客户启用 LocalDumps ,然后向您发送一个minidump文件
What you should be doing is have your customer enable LocalDumps, and then send you a minidump file which you can debug.
示例注册表设置:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
"DumpFolder"="d:\\miniDumps"
"DumpType"=dword:00000002
"CustomDumpFlags"=dword:00001124
这篇关于如何匹配崩溃的“故障偏移”到源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!