coffeecatch
coffeecatch copied to clipboard
CoffeeCatch, a tiny native POSIX signal catcher (especially useful for JNI code on Android/Dalvik)
``` static __attribute__ ((noinline)) void demo(int *fault) { COFFEE_TRY() { LOGD("_TEST", "num div:%d", 1 / (*fault)); *fault = 0; } COFFEE_CATCH() { const char*const message = coffeecatch_get_message(); snprintf(string_buffer, sizeof(string_buffer), "%s",...
it can fork a child process,and do work in child process, when receive signal, we can ptrace the child process to get stack information, this solution can be implement or...
Im building with android-ndk-r10e API Level 21 for x86_64 and i'm getting the error "Architecture is not supported (unknown ucontext layout)". I see that ucontext.h is supported for x86_64, so...
Coffeecatch crashes on android 7/8. I only managed to identify the crash point: ```c++ /* Call the old handler. */ static void coffeecatch_call_old_signal_handler(const int code, siginfo_t *const si, void *...
``` coffeecatch.c: In function 'coffeecatch_get_message': coffeecatch.c:1355:5: warning: return makes pointer from integer without a cast return strerror_r(error, &buffer[0], sizeof(buffer)); ^ ```
I enable coffeecatch in my thread. When other thread crashed, is captured by coffeecatch and call abort() in coffeecatch_signal_pass, receive android crash stacktrace as: 02-16 11:46:33.521: A/DEBUG(288): *** *** ***...
Sorry if this is a naive question, just came across this library, and haven't had time to research too thoroughly yet. I have a handful of libraries that access the...
Android ndk-build x86 compile returns an error: "redeclaration of struct 'struct _libc_fpreg'" (and more) which is already defined in "\ndk\platforms\android-9\arch-x86\usr\include\sys\ucontext.h". This patch fixed it with some small changes (https://gist.github.com/VladislavLipskiy/2a5014cfb48c0600df69). armv7a...
I put cofficecatch folder in jni and make project but get these errors: In cofficecatch.c Error:(211, 2) error: #error "Architecture is not supported (unknown ucontext layout)" Error:(1141, 2) error: #error...
I dont know if I did something wrong, but the library is just not doing anything for me. ``` c jboolean real_vpxGetFrame(JNIEnv *env, struct vpx_wrapper *wrapper, jobject bitmap, jint pixel_skip)...