mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 22:05:38 +00:00
CrashHandler: Fix call stack on manual dump
This commit is contained in:
parent
cca7b46114
commit
8e5781266a
|
@ -61,17 +61,26 @@ static bool WriteMinidump(HMODULE hDbgHelp, HANDLE hFile, HANDLE hProcess, DWORD
|
||||||
if (!minidump_write_dump)
|
if (!minidump_write_dump)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
MINIDUMP_EXCEPTION_INFORMATION mei;
|
MINIDUMP_EXCEPTION_INFORMATION mei = {};
|
||||||
PMINIDUMP_EXCEPTION_INFORMATION mei_ptr = nullptr;
|
|
||||||
if (exception)
|
if (exception)
|
||||||
{
|
{
|
||||||
mei.ThreadId = thread_id;
|
mei.ThreadId = thread_id;
|
||||||
mei.ExceptionPointers = exception;
|
mei.ExceptionPointers = exception;
|
||||||
mei.ClientPointers = FALSE;
|
mei.ClientPointers = FALSE;
|
||||||
mei_ptr = &mei;
|
return minidump_write_dump(hProcess, process_id, hFile, type, &mei, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return minidump_write_dump(hProcess, process_id, hFile, type, mei_ptr, nullptr, nullptr);
|
__try
|
||||||
|
{
|
||||||
|
RaiseException(EXCEPTION_INVALID_HANDLE, 0, 0, nullptr);
|
||||||
|
}
|
||||||
|
__except (WriteMinidump(hDbgHelp, hFile, GetCurrentProcess(), GetCurrentProcessId(), GetCurrentThreadId(),
|
||||||
|
GetExceptionInformation(), type),
|
||||||
|
EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::wstring s_write_directory;
|
static std::wstring s_write_directory;
|
||||||
|
|
Loading…
Reference in a new issue