mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55: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)
|
||||
return false;
|
||||
|
||||
MINIDUMP_EXCEPTION_INFORMATION mei;
|
||||
PMINIDUMP_EXCEPTION_INFORMATION mei_ptr = nullptr;
|
||||
MINIDUMP_EXCEPTION_INFORMATION mei = {};
|
||||
if (exception)
|
||||
{
|
||||
mei.ThreadId = thread_id;
|
||||
mei.ExceptionPointers = exception;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue