finish IronPad debugging
This commit is contained in:
parent
01d1f0a250
commit
f07ff1f246
|
@ -177,24 +177,22 @@ namespace IronPad {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UExceptionCoreDump(LPCWSTR filename, LPEXCEPTION_POINTERS info) {
|
static void UExceptionCoreDump(LPCWSTR filename, LPEXCEPTION_POINTERS info) {
|
||||||
// setup handle
|
|
||||||
HANDLE hProcess = GetCurrentProcess();
|
|
||||||
DWORD dwProcessId = GetCurrentProcessId();
|
|
||||||
DWORD dwThreadId = GetCurrentThreadId();
|
|
||||||
|
|
||||||
// open file and write
|
// open file and write
|
||||||
if (hProcess != INVALID_HANDLE_VALUE) {
|
|
||||||
HANDLE hFile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
HANDLE hFile = CreateFileW(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
if (hFile != INVALID_HANDLE_VALUE) {
|
if (hFile != INVALID_HANDLE_VALUE) {
|
||||||
MINIDUMP_EXCEPTION_INFORMATION exception_info;
|
MINIDUMP_EXCEPTION_INFORMATION exception_info;
|
||||||
exception_info.ThreadId = dwThreadId;
|
exception_info.ThreadId = GetCurrentThreadId();
|
||||||
exception_info.ExceptionPointers = info;
|
exception_info.ExceptionPointers = info;
|
||||||
exception_info.ClientPointers = TRUE;
|
exception_info.ClientPointers = TRUE;
|
||||||
MiniDumpWriteDump(hProcess, dwProcessId, hFile, MiniDumpWithFullMemory, &exception_info, NULL, NULL);
|
MiniDumpWriteDump(
|
||||||
|
GetCurrentProcess(), GetCurrentProcessId(), hFile,
|
||||||
|
MiniDumpWithFullMemory,
|
||||||
|
&exception_info,
|
||||||
|
NULL, NULL
|
||||||
|
);
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static LONG WINAPI UExceptionImpl(LPEXCEPTION_POINTERS info) {
|
static LONG WINAPI UExceptionImpl(LPEXCEPTION_POINTERS info) {
|
||||||
// detect loop calling
|
// detect loop calling
|
||||||
|
|
|
@ -442,8 +442,6 @@ namespace Unvirt::Context {
|
||||||
void Unvirt::Context::UnvirtContext::ProcTest(const CmdHelper::ArgumentsMap* amap) {
|
void Unvirt::Context::UnvirtContext::ProcTest(const CmdHelper::ArgumentsMap* amap) {
|
||||||
#if defined(LIBCMO_BUILD_DEBUG)
|
#if defined(LIBCMO_BUILD_DEBUG)
|
||||||
// MARK: Add the debug code here.
|
// MARK: Add the debug code here.
|
||||||
char p = 0;
|
|
||||||
char a = 1 / p;
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
PrintCommonError("Test command only available in Debug mode.");
|
PrintCommonError("Test command only available in Debug mode.");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user