我将 google-breakpad 插入到我的测试应用程序中。但是在应用程序崩溃并且我从转储中获取信息后,在崩溃的线程中总是这样:
google_breakpad::ExceptionHandler::WriteMinidumpOnHandlerThread
我究竟做错了什么?我怎样才能获得有用的崩溃地点?我的“安装代码”:
VS_ExceptionHandlerDescriptor(std::string dump_path) :
eh(std::wstring(dump_path.begin(), dump_path.end()), NULL, DumpCallback, NULL, true) {
}
我的崩溃部分代码:
void doCrash()
{
delete reinterpret_cast<char*>(0xFEE1DEAD);
}
int main()
{
bool installed = VS_ExceptionHandler::InstallExceptionHandler("C://Users//fetterless/Desktop");
doCrash();
return 0;
}
崩溃的线程堆栈跟踪:
Thread 0 (crashed)
0 ntdll.dll + 0x1f911
eip = 0x77c2f911 esp = 0x0057f778 ebp = 0x0057f7e4 ebx = 0x00000000
esi = 0x00000040 edi = 0x00000000 eax = 0x00000000 ecx = 0xeedc6d7f
edx = 0x00000000 efl = 0x00000246
Found by: given as instruction pointer in context
1 kernel32.dll + 0x11193
eip = 0x75cc1194 esp = 0x0057f7ec ebp = 0x0057f7fc
Found by: previous frame's frame pointer
2 kernel32.dll + 0x11147
eip = 0x75cc1148 esp = 0x0057f804 ebp = 0x0057f810
Found by: previous frame's frame pointer
3 CrashTest.exe!google_breakpad::ExceptionHandler::WriteMinidumpOnHandlerThread(_EXCEPTION_POINTERS *,MDRawAssertionInfo *) [exception_handler.cc : 722 + 0x13]
eip = 0x0019d303 esp = 0x0057f818 ebp = 0x0057f82c
Found by: previous frame's frame pointer
4 CrashTest.exe!google_breakpad::ExceptionHandler::HandleException(_EXCEPTION_POINTERS *) [exception_handler.cc : 506 + 0xd]
eip = 0x0019bc65 esp = 0x0057f834 ebp = 0x0057f86c
Found by: call frame info
5 kernel32.dll + 0x50302
eip = 0x75d00303 esp = 0x0057f874 ebp = 0x0057f8f4
Found by: call frame info
6 ntdll.dll + 0x7344e
eip = 0x77c8344f esp = 0x0057f8fc ebp = 0x0057ffa8
Found by: previous frame's frame pointer
7 ntdll.dll + 0x39854
eip = 0x77c49855 esp = 0x0057ffb0 ebp = 0x0057ffc0
Found by: previous frame's frame pointer
UPD1:我发现来自不同计算机的同一崩溃程序的转储具有不同的信息。从上面的第一个转储无用,在另一个上它显示了完全需要的堆栈和位置。这件事有什么问题?
UPD2:下面的答案对我有帮助。我想补充一点,您可以安装 Cygwin 并使用它的 minidump_stackwalk 来生成有用的堆栈跟踪。如果您不想安装它并且只需要解码转储的东西,这里是存档,您可以在其中找到 minidump_stackwalk.exe 和所有需要的 dll。我从我安装的 Cygwin 中取出它们。minidump_stackwalk 存档