Remove x86_32 from x64MemTools

This commit is contained in:
Ryan Houdek 2014-05-27 23:38:27 -05:00
parent 8a123b4d75
commit e004c8ff2d
1 changed files with 0 additions and 14 deletions

View File

@ -113,7 +113,6 @@ LONG NTAPI Handler(PEXCEPTION_POINTERS pPtrs)
void InstallExceptionHandler() void InstallExceptionHandler()
{ {
#if _M_X86_64
// Make sure this is only called once per process execution // Make sure this is only called once per process execution
// Instead, could make a Uninstall function, but whatever.. // Instead, could make a Uninstall function, but whatever..
static bool handlerInstalled = false; static bool handlerInstalled = false;
@ -122,7 +121,6 @@ void InstallExceptionHandler()
AddVectoredExceptionHandler(TRUE, Handler); AddVectoredExceptionHandler(TRUE, Handler);
handlerInstalled = true; handlerInstalled = true;
#endif
} }
#elif defined(__APPLE__) #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) void ExceptionThread(mach_port_t port)
{ {
Common::SetCurrentThreadName("Mach exception thread"); Common::SetCurrentThreadName("Mach exception thread");
@ -226,13 +223,9 @@ void ExceptionThread(mach_port_t port)
option |= MACH_SEND_MSG; option |= MACH_SEND_MSG;
} }
} }
#endif
void InstallExceptionHandler() void InstallExceptionHandler()
{ {
#if _M_X86_32
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
#else
mach_port_t port; mach_port_t port;
CheckKR("mach_port_allocate", mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port)); CheckKR("mach_port_allocate", mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port));
std::thread exc_thread(ExceptionThread, 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)); CheckKR("mach_port_mod_refs", mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1));
mach_port_t previous; 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)); 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) #elif !defined(ANDROID)
static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context) static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
{ {
#ifndef _M_GENERIC
if (sig != SIGSEGV) if (sig != SIGSEGV)
{ {
// We are not interested in other signals - handle it as usual. // 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 // retry and crash
signal(SIGSEGV, SIG_DFL); signal(SIGSEGV, SIG_DFL);
} }
#endif
} }
void InstallExceptionHandler() void InstallExceptionHandler()
{ {
#if _M_X86_32
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
#else
struct sigaction sa; struct sigaction sa;
sa.sa_handler = nullptr; sa.sa_handler = nullptr;
sa.sa_sigaction = &sigsegv_handler; sa.sa_sigaction = &sigsegv_handler;
sa.sa_flags = SA_SIGINFO; sa.sa_flags = SA_SIGINFO;
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, nullptr); sigaction(SIGSEGV, &sa, nullptr);
#endif
} }
#endif #endif