Add support for building the Linux client code using the Android NDK

r=mwu at http://breakpad.appspot.com/212001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@716 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek 2010-10-20 15:51:38 +00:00
parent 9c30407f7f
commit cfc8628092
15 changed files with 248 additions and 26 deletions
src/client/linux/handler

View file

@ -73,12 +73,18 @@
#include <stdio.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#if !defined(__ANDROID__)
#include <sys/signal.h>
#endif
#include <sys/syscall.h>
#if !defined(__ANDROID__)
#include <sys/ucontext.h>
#include <sys/user.h>
#endif
#include <sys/wait.h>
#if !defined(__ANDROID__)
#include <ucontext.h>
#endif
#include <unistd.h>
#include <algorithm>
@ -186,7 +192,7 @@ bool ExceptionHandler::InstallHandlers() {
stack.ss_sp = signal_stack;
stack.ss_size = kSigStackSize;
if (sigaltstack(&stack, NULL) == -1)
if (sys_sigaltstack(&stack, NULL) == -1)
return false;
struct sigaction sa;
@ -322,7 +328,7 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
return false;
// Allow ourselves to be dumped.
prctl(PR_SET_DUMPABLE, 1);
sys_prctl(PR_SET_DUMPABLE, 1);
CrashContext context;
memcpy(&context.siginfo, info, sizeof(siginfo_t));
memcpy(&context.context, uc, sizeof(struct ucontext));