diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-03-09 19:11:58 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-03-09 19:11:58 +0000 |
commit | b1f858f26b136044922eeae0d86488b17b54efff (patch) | |
tree | e805f24222008bd24199ca836915cc66587912f8 /src/client/mac/handler/exception_handler.h | |
parent | Add COPYING file per libcurl distribution requirements (diff) | |
download | breakpad-b1f858f26b136044922eeae0d86488b17b54efff.tar.xz |
Add SIGABRT handler for mac and iOS.
SIGABRT were not handled while in process. This change add a signal handler to
handle this.
Review URL: https://breakpad.appspot.com/360001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@933 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/exception_handler.h')
-rw-r--r-- | src/client/mac/handler/exception_handler.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/mac/handler/exception_handler.h b/src/client/mac/handler/exception_handler.h index 4689e3af..ec091341 100644 --- a/src/client/mac/handler/exception_handler.h +++ b/src/client/mac/handler/exception_handler.h @@ -187,12 +187,16 @@ class ExceptionHandler { int exception_code, int exception_subcode, mach_port_t thread_name, - bool exit_after_write); + bool exit_after_write, + bool report_current_thread); // When installed, this static function will be call from a newly created // pthread with |this| as the argument static void *WaitForMessage(void *exception_handler_class); + // Signal handler for SIGABRT. + static void SignalHandler(int sig, siginfo_t* info, void* uc); + // disallow copy ctor and operator= explicit ExceptionHandler(const ExceptionHandler &); void operator=(const ExceptionHandler &); @@ -258,6 +262,10 @@ class ExceptionHandler { // True, if we're using the mutext to indicate when mindump writing occurs bool use_minidump_write_mutex_; + // Old signal handler for SIGABRT. Used to be able to restore it when + // uninstalling. + scoped_ptr<struct sigaction> old_handler_; + #if !TARGET_OS_IPHONE // Client for out-of-process dump generation. scoped_ptr<CrashGenerationClient> crash_generation_client_; |