Bug 1426090 - Use minidump type 'MiniDumpWithIndirectlyReferencedMemory' for nightly on Windows. r=ted

This makes heap objects directly referenced from stack objects accessbile when
debugging minidumps with a debugger, with the cost of doubling the size of
minidumps.

MozReview-Commit-ID: 52ox1lFcaAz
This commit is contained in:
Cervantes Yu 2018-01-03 16:06:11 +08:00
parent db9f405bd9
commit 9beba4bdfb

View File

@ -42,6 +42,7 @@
#include "nsDirectoryServiceUtils.h"
#include "nsWindowsDllInterceptor.h"
#include "mozilla/WindowsVersion.h"
#elif defined(XP_MACOSX)
#include "breakpad-client/mac/crash_generation/client_info.h"
#include "breakpad-client/mac/crash_generation/crash_generation_server.h"
@ -1410,6 +1411,15 @@ GetMinidumpType()
minidump_type = static_cast<MINIDUMP_TYPE>(minidump_type |
MiniDumpWithUnloadedModules |
MiniDumpWithProcessThreadData);
// dbghelp.dll on Win7 can't handle overlapping memory regions so we only
// enable this feature on Win8 or later.
if (IsWin8OrLater()) {
minidump_type = static_cast<MINIDUMP_TYPE>(minidump_type |
// This allows us to examine heap objects referenced from stack objects
// at the cost of further doubling the size of minidumps.
MiniDumpWithIndirectlyReferencedMemory);
}
#endif
const char* e = PR_GetEnv("MOZ_CRASHREPORTER_FULLDUMP");