summaryrefslogtreecommitdiff
path: root/jni
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-22 22:57:54 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-22 22:57:54 +0100
commit2ddc5f8b867aabe1820d37bb89db8e91efd10234 (patch)
tree79b10ae28ae43d76f66beb72a8d5626e4c68e62b /jni
parent904ce469f833d005b9d209b415924d3ba64bfb01 (diff)
commit files forgot in last commit, add push fix
Diffstat (limited to 'jni')
-rw-r--r--jni/icsandroid.cpp30
-rw-r--r--jni/icsandroid.h9
2 files changed, 39 insertions, 0 deletions
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<volatile int*>(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