Merge remote-tracking branch 'origin/develop' into minidump

# Conflicts:
#	src/Components/Modules/Exception.cpp
#	src/Components/Modules/Exception.hpp
This commit is contained in:
/dev/urandom 2016-08-28 21:30:12 +02:00
commit 2772701412
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E
3 changed files with 18 additions and 3 deletions

2
deps/fmt vendored

@ -1 +1 @@
Subproject commit 2ae6bca488795929a0207d109e135751f10c53d9
Subproject commit 0d25f6fcbbf0a867b939a5501965ee4462b21ee6

View File

@ -9,6 +9,8 @@
namespace Components
{
Utils::Hook Exception::SetFilterHook;
LONG WINAPI Exception::ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo)
{
// Pass on harmless errors
@ -43,7 +45,10 @@ namespace Components
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI Exception::SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER)
{
return SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
Exception::SetFilterHook.Uninstall();
LPTOP_LEVEL_EXCEPTION_FILTER retval = SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
Exception::SetFilterHook.Install();
return retval;
}
LPTOP_LEVEL_EXCEPTION_FILTER Exception::Hook()
@ -72,7 +77,9 @@ namespace Components
});
#endif
#if !defined(DEBUG) || defined(FORCE_EXCEPTION_HANDLER)
Utils::Hook::Set(0x6D70AC, Exception::SetUnhandledExceptionFilterStub);
Exception::SetFilterHook.Initialize(SetUnhandledExceptionFilter, Exception::SetUnhandledExceptionFilterStub, HOOK_JUMP);
Exception::SetFilterHook.Install();
SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
#endif
@ -176,4 +183,9 @@ namespace Components
});
#pragma warning(pop)
}
Exception::~Exception()
{
Exception::SetFilterHook.Uninstall();
}
}

View File

@ -6,6 +6,7 @@ namespace Components
{
public:
Exception();
~Exception();
#ifdef DEBUG
const char* GetName() { return "Exception"; };
@ -15,5 +16,7 @@ namespace Components
private:
static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo);
static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
static Utils::Hook SetFilterHook;
};
}