-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add google break pad support (only tested under Android)
also add crash option to test it Signed-off-by: Arne Schwabe <[email protected]>
- Loading branch information
Showing
5 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
#include "breakpad.h" | ||
#include "client/linux/handler/exception_handler.h" | ||
|
||
|
||
static | ||
bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, | ||
void* context, | ||
bool succeeded) { | ||
printf("Dump path: %s\n", descriptor.path()); | ||
fflush(stdout); | ||
fflush(stderr); | ||
return succeeded; | ||
} | ||
|
||
static google_breakpad::MinidumpDescriptor* desc; | ||
static google_breakpad::ExceptionHandler* eh; | ||
|
||
void breakpad_setup(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); | ||
} | ||
|
||
void breakpad_dodump(void) | ||
{ | ||
eh->WriteMinidump(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
void breakpad_setup(void); | ||
|
||
void breakpad_dodump(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters