Generate a more complete context in debug_minidump.
This commit is contained in:
parent
fddfc56ae1
commit
d3d8884f93
@ -193,19 +193,34 @@ namespace Components
|
||||
|
||||
Command::Execute(command, false);
|
||||
});
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4740) // flow in or out of inline asm code suppresses global optimization
|
||||
Command::Add("debug_minidump", [](Command::Params)
|
||||
{
|
||||
CONTEXT ectx;
|
||||
ZeroMemory(&ectx, sizeof(CONTEXT));
|
||||
ectx.ContextFlags = CONTEXT_CONTROL;
|
||||
|
||||
__asm
|
||||
{
|
||||
Label:
|
||||
mov[ectx.Ebp], ebp;
|
||||
mov[ectx.Esp], esp;
|
||||
mov eax, [Label];
|
||||
mov[ectx.Eip], eax;
|
||||
}
|
||||
|
||||
EXCEPTION_RECORD erec;
|
||||
erec.ExceptionAddress = 0x0;
|
||||
ZeroMemory(&erec, sizeof(EXCEPTION_RECORD));
|
||||
erec.ExceptionAddress = _ReturnAddress();
|
||||
erec.ExceptionCode = EXCEPTION_BREAKPOINT;
|
||||
|
||||
EXCEPTION_POINTERS eptr;
|
||||
eptr.ContextRecord = &ectx;
|
||||
eptr.ExceptionRecord = &erec;
|
||||
auto eptr = new EXCEPTION_POINTERS();
|
||||
eptr->ContextRecord = &ectx;
|
||||
eptr->ExceptionRecord = &erec;
|
||||
|
||||
Exception::ExceptionFilter(&eptr);
|
||||
Exception::ExceptionFilter(eptr);
|
||||
});
|
||||
#pragma warning(pop)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user