Remove x86_32 from x64MemTools
This commit is contained in:
parent
8a123b4d75
commit
e004c8ff2d
|
@ -113,7 +113,6 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
|
|||
|
||||
void InstallExceptionHandler()
|
||||
{
|
||||
#if _M_X86_64
|
||||
// Make sure this is only called once per process execution
|
||||
// Instead, could make a Uninstall function, but whatever..
|
||||
static bool handlerInstalled = false;
|
||||
|
@ -122,7 +121,6 @@ void InstallExceptionHandler()
|
|||
|
||||
AddVectoredExceptionHandler(TRUE, Handler);
|
||||
handlerInstalled = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
|
@ -135,7 +133,6 @@ void CheckKR(const char* name, kern_return_t kr)
|
|||
}
|
||||
}
|
||||
|
||||
#if _M_X86_64
|
||||
void ExceptionThread(mach_port_t port)
|
||||
{
|
||||
Common::SetCurrentThreadName("Mach exception thread");
|
||||
|
@ -226,13 +223,9 @@ void ExceptionThread(mach_port_t port)
|
|||
option |= MACH_SEND_MSG;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void InstallExceptionHandler()
|
||||
{
|
||||
#if _M_X86_32
|
||||
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
|
||||
#else
|
||||
mach_port_t port;
|
||||
CheckKR("mach_port_allocate", mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port));
|
||||
std::thread exc_thread(ExceptionThread, port);
|
||||
|
@ -246,14 +239,12 @@ void InstallExceptionHandler()
|
|||
CheckKR("mach_port_mod_refs", mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1));
|
||||
mach_port_t previous;
|
||||
CheckKR("mach_port_request_notification", mach_port_request_notification(mach_task_self(), port, MACH_NOTIFY_NO_SENDERS, 0, port, MACH_MSG_TYPE_MAKE_SEND_ONCE, &previous));
|
||||
#endif
|
||||
}
|
||||
|
||||
#elif !defined(ANDROID)
|
||||
|
||||
static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
|
||||
{
|
||||
#ifndef _M_GENERIC
|
||||
if (sig != SIGSEGV)
|
||||
{
|
||||
// We are not interested in other signals - handle it as usual.
|
||||
|
@ -276,21 +267,16 @@ static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
|
|||
// retry and crash
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void InstallExceptionHandler()
|
||||
{
|
||||
#if _M_X86_32
|
||||
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
|
||||
#else
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = nullptr;
|
||||
sa.sa_sigaction = &sigsegv_handler;
|
||||
sa.sa_flags = SA_SIGINFO;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(SIGSEGV, &sa, nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue