mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-15 12:39:42 +00:00
Merge branch 'issue-7924-envvar-crashdump' into 'master'
components/crashcatcher: if OPENMW_FULL_MEMDUMP is set, generate a full memory crashdump See merge request OpenMW/openmw!4078
This commit is contained in:
commit
2f8e3611fb
1 changed files with 5 additions and 0 deletions
|
@ -231,6 +231,7 @@ namespace Crash
|
||||||
void CrashMonitor::handleCrash(bool isFreeze)
|
void CrashMonitor::handleCrash(bool isFreeze)
|
||||||
{
|
{
|
||||||
DWORD processId = GetProcessId(mAppProcessHandle);
|
DWORD processId = GetProcessId(mAppProcessHandle);
|
||||||
|
const char* env = getenv("OPENMW_FULL_MEMDUMP");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -268,6 +269,10 @@ namespace Crash
|
||||||
infos.ExceptionPointers = &exp;
|
infos.ExceptionPointers = &exp;
|
||||||
infos.ClientPointers = FALSE;
|
infos.ClientPointers = FALSE;
|
||||||
MINIDUMP_TYPE type = (MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithHandleData);
|
MINIDUMP_TYPE type = (MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithHandleData);
|
||||||
|
|
||||||
|
if (env)
|
||||||
|
type = static_cast<MINIDUMP_TYPE>(type | MiniDumpWithFullMemory);
|
||||||
|
|
||||||
miniDumpWriteDump(mAppProcessHandle, processId, hCrashLog, type, &infos, 0, 0);
|
miniDumpWriteDump(mAppProcessHandle, processId, hCrashLog, type, &infos, 0, 0);
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
|
|
Loading…
Reference in a new issue