[Android] Disable x64MemTools' backpatching. It isn't available on x86 anyway.

This commit is contained in:
Ryan Houdek 2013-07-11 09:00:08 -05:00
parent 012c32c14c
commit 6e74d4b21d
1 changed files with 6 additions and 1 deletions

View File

@ -7,8 +7,10 @@
#else #else
#include <stdio.h> #include <stdio.h>
#include <signal.h> #include <signal.h>
#ifndef ANDROID
#include <sys/ucontext.h> // Look in here for the context definition. #include <sys/ucontext.h> // Look in here for the context definition.
#endif #endif
#endif
#ifdef __APPLE__ #ifdef __APPLE__
#define CREG_RAX(ctx) (*(ctx))->__ss.__rax #define CREG_RAX(ctx) (*(ctx))->__ss.__rax
@ -150,6 +152,7 @@ void InstallExceptionHandler()
#else // _WIN32 #else // _WIN32
#ifndef ANDROID
#if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ || defined _WIN32 #if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ || defined _WIN32
#ifndef _WIN32 #ifndef _WIN32
#include <execinfo.h> #include <execinfo.h>
@ -235,19 +238,21 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
} }
#endif #endif
} }
#endif
void InstallExceptionHandler() void InstallExceptionHandler()
{ {
#ifdef _M_IX86 #ifdef _M_IX86
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it."); PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
return; return;
#endif #else
struct sigaction sa; struct sigaction sa;
sa.sa_handler = 0; sa.sa_handler = 0;
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, NULL); sigaction(SIGSEGV, &sa, NULL);
#endif
} }
#endif #endif