diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-07 15:57:23 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2011-10-07 15:57:23 +0000 |
commit | 9525fcd6338ac1697f26306216f579fa60cba657 (patch) | |
tree | 43b69333262270f3b4373c0e562206cb8c807430 /src/client/mac/handler/exception_handler.cc | |
parent | 10.4 SDK fix (diff) | |
download | breakpad-9525fcd6338ac1697f26306216f579fa60cba657.tar.xz |
#ifdef cpu specific code.
Review URL: http://breakpad.appspot.com/307002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@848 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/exception_handler.cc')
-rw-r--r-- | src/client/mac/handler/exception_handler.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc index d4cd43d5..54eb409d 100644 --- a/src/client/mac/handler/exception_handler.cc +++ b/src/client/mac/handler/exception_handler.cc @@ -29,6 +29,7 @@ #include <map> #include <pthread.h> +#include <TargetConditionals.h> #include "client/mac/handler/exception_handler.h" #include "client/mac/handler/minidump_generator.h" @@ -36,8 +37,12 @@ #include "common/mac/scoped_task_suspend-inl.h" #ifndef USE_PROTECTED_ALLOCATIONS +#if TARGET_OS_IPHONE +#define USE_PROTECTED_ALLOCATIONS 1 +#else #define USE_PROTECTED_ALLOCATIONS 0 #endif +#endif // If USE_PROTECTED_ALLOCATIONS is activated then the // gBreakpadAllocator needs to be setup in other code @@ -239,8 +244,10 @@ ExceptionHandler::ExceptionHandler(const string &dump_path, // This will update to the ID and C-string pointers set_dump_path(dump_path); MinidumpGenerator::GatherSystemInformation(); +#if !TARGET_OS_IPHONE if (port_name) crash_generation_client_.reset(new CrashGenerationClient(port_name)); +#endif Setup(install_handler); } @@ -322,6 +329,8 @@ bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child, EXC_I386_BPT, #elif defined (__ppc__) || defined (__ppc64__) EXC_PPC_BREAKPOINT, +#elif defined (__arm__) + EXC_ARM_BREAKPOINT, #else #error architecture not supported #endif @@ -352,6 +361,7 @@ bool ExceptionHandler::WriteMinidumpWithException(int exception_type, if (exit_after_write) _exit(exception_type); } +#if !TARGET_OS_IPHONE } else if (IsOutOfProcess()) { if (exception_type && exception_code) { // If this is a real exception, give the filter (if any) a chance to @@ -364,6 +374,7 @@ bool ExceptionHandler::WriteMinidumpWithException(int exception_type, exception_subcode, thread_name); } +#endif } else { string minidump_id; @@ -548,6 +559,8 @@ void *ExceptionHandler::WaitForMessage(void *exception_handler_class) { exception_code = EXC_I386_BPT; #elif defined (__ppc__) || defined (__ppc64__) exception_code = EXC_PPC_BREAKPOINT; +#elif defined (__arm__) + exception_code = EXC_ARM_BREAKPOINT; #else #error architecture not supported #endif |