aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-03-13 20:02:40 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-03-13 20:02:40 +0000
commit1e8d2d5a4c1e0f59d72c726d47d20bf1fe36aac7 (patch)
tree838f6c4c320b6f9b22e1fcf3df1677dcfcad1138 /src/client/mac/handler
parent Change iOS implementation to not use exc_server (diff)
downloadbreakpad-1e8d2d5a4c1e0f59d72c726d47d20bf1fe36aac7.tar.xz
Add high level API for breakpad on iOS.
The new API allows to automatically upload repports to the crash server when the application restarts. This change also: - Correct a bug on the test for correct alignment of the abrt signal handler - Add user friendly information on crashes for SIGABRT and NSException Review URL: https://breakpad.appspot.com/361001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@935 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler')
-rw-r--r--src/client/mac/handler/exception_handler.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
index d28c0772..b2f59b93 100644
--- a/src/client/mac/handler/exception_handler.cc
+++ b/src/client/mac/handler/exception_handler.cc
@@ -38,6 +38,7 @@
#include "client/mac/handler/minidump_generator.h"
#include "common/mac/macho_utilities.h"
#include "common/mac/scoped_task_suspend-inl.h"
+#include "google_breakpad/common/minidump_exception_mac.h"
#ifndef USE_PROTECTED_ALLOCATIONS
#if TARGET_OS_IPHONE
@@ -580,12 +581,13 @@ void *ExceptionHandler::WaitForMessage(void *exception_handler_class) {
//static
void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
- gProtectedData.handler->WriteMinidumpWithException(EXC_CRASH,
- 0xDEADBEEF,
- 0,
- mach_thread_self(),
- true,
- true);
+ gProtectedData.handler->WriteMinidumpWithException(
+ EXC_SOFTWARE,
+ MD_EXCEPTION_CODE_MAC_ABORT,
+ 0,
+ mach_thread_self(),
+ true,
+ true);
}
bool ExceptionHandler::InstallHandler() {
@@ -609,7 +611,7 @@ bool ExceptionHandler::InstallHandler() {
old_handler_.swap(old);
gProtectedData.handler = this;
#if USE_PROTECTED_ALLOCATIONS
- assert(((size_t)(*gProtectedData.protected_buffer) & PAGE_MASK) == 0);
+ assert(((size_t)(gProtectedData.protected_buffer) & PAGE_MASK) == 0);
mprotect(gProtectedData.protected_buffer, PAGE_SIZE, PROT_READ);
#endif
}