I'm using google breakpad to catch incorrect operations which lead SIGSEGV signal. I expect the process to continue but it's finished by dalvik jvm in android. How can i recovery the process from finishing on android?
Asked
Active
Viewed 178 times
0
-
Duplicate of http://stackoverflow.com/questions/22267382/ ? – fadden Mar 09 '14 at 16:43
-
the link you've sent is about breakpad. this question is not related to breakpad – 4ntoine Mar 09 '14 at 16:51
1 Answers
1
Have you tried this?
#include <signal.h>
#include <stdio.h>
#define __USE_GNU
#include <ucontext.h>
int *p = NULL;
int n = 100;
void sighandler(int signo, siginfo_t *si, ucontext_t* context)
{
printf("Handler executed for signal %d\n", signo);
context->uc_mcontext.gregs[REG_RAX] = &n;
}
_your_amazing_method (jenv *env, jobject obj, _your_args)
{
do_some_dirty_stuff();
signal(SIGSEGV, sighandler);
printf("%d\n", *p); // ... movl (%rax), %esi ...
return 0;
}