aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/exception_handler.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-11-21 17:44:57 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-11-21 17:44:57 +0000
commit77022ac0df3e079fb0abea05033b0239d12a4e72 (patch)
tree6f7207ff153e8306c441fa0cdb18b728ef971fe5 /src/client/mac/handler/exception_handler.cc
parentProvide BreakpadGetCrashReportCount() and -[BreakpadController (diff)
downloadbreakpad-77022ac0df3e079fb0abea05033b0239d12a4e72.tar.xz
Generate minidumps for 64-bit ARM apps on iOS.
Adds an ARM64-specific definition of MDRawContext and support for writing out a minidump when running on ARM64. Additionally, extends the iOS minidump generator for NSExceptions to work on ARM64 as well as ARM. Patch by Colin Blundell <blundell@chromium.org> BUG=542 Review URL: https://breakpad.appspot.com/664002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1235 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/exception_handler.cc')
-rw-r--r--src/client/mac/handler/exception_handler.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
index e2ae4e31..58ecc415 100644
--- a/src/client/mac/handler/exception_handler.cc
+++ b/src/client/mac/handler/exception_handler.cc
@@ -326,7 +326,7 @@ bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child,
EXC_I386_BPT,
#elif defined(__ppc__) || defined(__ppc64__)
EXC_PPC_BREAKPOINT,
-#elif defined(__arm__)
+#elif defined(__arm__) || defined(__arm64__)
EXC_ARM_BREAKPOINT,
#else
#error architecture not supported
@@ -342,13 +342,14 @@ bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child,
return result;
}
-bool ExceptionHandler::WriteMinidumpWithException(int exception_type,
- int exception_code,
- int exception_subcode,
- ucontext_t* task_context,
- mach_port_t thread_name,
- bool exit_after_write,
- bool report_current_thread) {
+bool ExceptionHandler::WriteMinidumpWithException(
+ int exception_type,
+ int exception_code,
+ int exception_subcode,
+ breakpad_ucontext_t* task_context,
+ mach_port_t thread_name,
+ bool exit_after_write,
+ bool report_current_thread) {
bool result = false;
if (directCallback_) {
@@ -453,12 +454,13 @@ kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread,
exception_behavior_t target_behavior = current.behaviors[found];
kern_return_t result;
+ // TODO: Handle the case where |target_behavior| has MACH_EXCEPTION_CODES
+ // set. https://code.google.com/p/google-breakpad/issues/detail?id=551
switch (target_behavior) {
case EXCEPTION_DEFAULT:
result = exception_raise(target_port, failed_thread, task, exception,
code, code_count);
break;
-
default:
fprintf(stderr, "** Unknown exception behavior: %d\n", target_behavior);
result = KERN_FAILURE;
@@ -520,7 +522,7 @@ 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__)
+#elif defined(__arm__) || defined(__arm64__)
exception_code = EXC_ARM_BREAKPOINT;
#else
#error architecture not supported
@@ -611,7 +613,7 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) {
EXC_SOFTWARE,
MD_EXCEPTION_CODE_MAC_ABORT,
0,
- static_cast<ucontext_t*>(uc),
+ static_cast<breakpad_ucontext_t*>(uc),
mach_thread_self(),
true,
true);