Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Disable x64MemTools' backpatching. It isn't available on x8…
…6 anyway.
  • Loading branch information
Sonicadvance1 committed Jul 11, 2013
1 parent 012c32c commit 6e74d4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Core/Core/Src/x64MemTools.cpp
Expand Up @@ -7,8 +7,10 @@
#else
#include <stdio.h>
#include <signal.h>
#ifndef ANDROID
#include <sys/ucontext.h> // Look in here for the context definition.
#endif
#endif

#ifdef __APPLE__
#define CREG_RAX(ctx) (*(ctx))->__ss.__rax
Expand Down Expand Up @@ -150,6 +152,7 @@ void InstallExceptionHandler()

#else // _WIN32

#ifndef ANDROID
#if defined __APPLE__ || defined __linux__ || defined __FreeBSD__ || defined _WIN32
#ifndef _WIN32
#include <execinfo.h>
Expand Down Expand Up @@ -235,19 +238,21 @@ void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
}
#endif
}
#endif

void InstallExceptionHandler()
{
#ifdef _M_IX86
PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");
return;
#endif
#else
struct sigaction sa;
sa.sa_handler = 0;
sa.sa_sigaction = &sigsegv_handler;
sa.sa_flags = SA_SIGINFO;
sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, NULL);
#endif
}

#endif
Expand Down

0 comments on commit 6e74d4b

Please sign in to comment.