无用的垃圾在谷歌breakpad

Useless dumps in google-breakpad

本文关键字:谷歌 breakpad 无用      更新时间:2023-10-16

我在测试应用程序中插入了谷歌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来生成usefull堆栈跟踪。如果你不想安装它,只需要解码转储的东西,这里有一个档案,你可以在其中找到minidump_stackwalk.exe和它所需的所有dll。我从我安装的Cygwin中拿走了它们。minidump_stackwalk归档

我在一些Windows机器上也遇到了同样的情况。有趣的是,Windows 10对我来说运行良好,而Windows 7和8.1的结果与你的类似。我只能得出结论,问题出在堆栈walker(minidump_stackwalk.exe或Cygwin dll之一)上。符号文件和.dmp文件还可以。我实际上处理了一台有问题的Windows机器上的符号和.dmp,并能够在我的Linux盒子上生成正确的调用堆栈。因此,您也可以将此作为变通方案。但解决方案必须来自谷歌。