MemTools: Get rid of a global variable
This commit is contained in:
parent
ff0e1c3624
commit
b688a62143
|
@ -30,8 +30,6 @@ namespace EMM
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
const bool g_exception_handlers_supported = true;
|
|
||||||
|
|
||||||
LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
|
LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
|
||||||
{
|
{
|
||||||
switch (pPtrs->ExceptionRecord->ExceptionCode)
|
switch (pPtrs->ExceptionRecord->ExceptionCode)
|
||||||
|
@ -100,8 +98,6 @@ void UninstallExceptionHandler() {}
|
||||||
|
|
||||||
#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
|
#elif defined(__APPLE__) && !defined(USE_SIGACTION_ON_APPLE)
|
||||||
|
|
||||||
const bool g_exception_handlers_supported = true;
|
|
||||||
|
|
||||||
static void CheckKR(const char* name, kern_return_t kr)
|
static void CheckKR(const char* name, kern_return_t kr)
|
||||||
{
|
{
|
||||||
if (kr)
|
if (kr)
|
||||||
|
@ -222,8 +218,6 @@ void UninstallExceptionHandler() {}
|
||||||
|
|
||||||
#elif defined(_POSIX_VERSION) && !defined(_M_GENERIC)
|
#elif defined(_POSIX_VERSION) && !defined(_M_GENERIC)
|
||||||
|
|
||||||
const bool g_exception_handlers_supported = true;
|
|
||||||
|
|
||||||
static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
|
static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
|
||||||
{
|
{
|
||||||
if (sig != SIGSEGV && sig != SIGBUS)
|
if (sig != SIGSEGV && sig != SIGBUS)
|
||||||
|
@ -294,7 +288,6 @@ void UninstallExceptionHandler()
|
||||||
}
|
}
|
||||||
#else // _M_GENERIC or unsupported platform
|
#else // _M_GENERIC or unsupported platform
|
||||||
|
|
||||||
const bool g_exception_handlers_supported = false;
|
|
||||||
void InstallExceptionHandler() {}
|
void InstallExceptionHandler() {}
|
||||||
void UninstallExceptionHandler() {}
|
void UninstallExceptionHandler() {}
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace EMM
|
namespace EMM
|
||||||
{
|
{
|
||||||
extern const bool g_exception_handlers_supported;
|
|
||||||
void InstallExceptionHandler();
|
void InstallExceptionHandler();
|
||||||
void UninstallExceptionHandler();
|
void UninstallExceptionHandler();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue