From 586b8bd003be24b32b121b320dafe142e74d2752 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 22 Dec 2012 22:57:54 +0100 Subject: commit files forgot in last commit, add push fix --- jni/icsandroid.cpp | 30 ++++++++++++++++++++++++++++++ jni/icsandroid.h | 9 +++++++++ 2 files changed, 39 insertions(+) create mode 100644 jni/icsandroid.cpp create mode 100644 jni/icsandroid.h (limited to 'jni') diff --git a/jni/icsandroid.cpp b/jni/icsandroid.cpp new file mode 100644 index 00000000..cd63c6fd --- /dev/null +++ b/jni/icsandroid.cpp @@ -0,0 +1,30 @@ + +#include "icsandroid.h" +#include "client/linux/handler/exception_handler.h" + +namespace { + +bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, + void* context, + bool succeeded) { + printf("Dump path: %s\n", descriptor.path()); +fflush(stdout); + return succeeded; +} + +void Crash() { + volatile int* a = reinterpret_cast(NULL); + *a = 1; +} + +} // namespace + +static google_breakpad::MinidumpDescriptor* desc; +static google_breakpad::ExceptionHandler* eh; +void setup_breakpad(void) +{ +printf("Initializing Google Breakpad!\n"); +desc = new google_breakpad::MinidumpDescriptor("/data/data/de.blinkt.openvpn/cache"); +eh = new google_breakpad::ExceptionHandler(*desc, NULL, DumpCallback, NULL, true,-1); +} + diff --git a/jni/icsandroid.h b/jni/icsandroid.h new file mode 100644 index 00000000..cd11da40 --- /dev/null +++ b/jni/icsandroid.h @@ -0,0 +1,9 @@ +#ifdef __cplusplus +extern "C" { +#endif + + void setup_breakpad(void); + +#ifdef __cplusplus +} +#endif -- cgit v1.2.3