From 1e8d2d5a4c1e0f59d72c726d47d20bf1fe36aac7 Mon Sep 17 00:00:00 2001 From: "qsr@chromium.org" Date: Tue, 13 Mar 2012 20:02:40 +0000 Subject: 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 --- src/client/mac/handler/exception_handler.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/client/mac') 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 } -- cgit v1.2.1