From d93f6b93931c63704caccabb4f1a41cce8896eb1 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Thu, 14 Oct 2021 13:04:32 -0400 Subject: [PATCH] ios/mac: Add exception code for Crashpad uncaught exceptions. Change-Id: I4c6a6fb353cacb09710c579e59332d70d1e801a8 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3093129 Reviewed-by: Mark Mentovai --- src/google_breakpad/common/minidump_exception_mac.h | 2 ++ src/processor/minidump_processor.cc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/google_breakpad/common/minidump_exception_mac.h b/src/google_breakpad/common/minidump_exception_mac.h index fadbf4ef..d5e59652 100644 --- a/src/google_breakpad/common/minidump_exception_mac.h +++ b/src/google_breakpad/common/minidump_exception_mac.h @@ -69,6 +69,8 @@ typedef enum { /* EXC_RPC_ALERT */ MD_EXCEPTION_MAC_SIMULATED = 0x43507378 /* Fake exception code used by Crashpad's SimulateCrash ('CPsx'). */ + MD_NS_EXCEPTION_SIMULATED = 0x43506E78 + /* Fake exception code used by Crashpad's uncaught exceptions ('CPnx'). */ } MDExceptionMac; /* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index 04b7e129..ac86fbd3 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -1138,6 +1138,9 @@ string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address) { case MD_EXCEPTION_MAC_SIMULATED: reason = "Simulated Exception"; break; + case MD_NS_EXCEPTION_SIMULATED: + reason = "Uncaught NSException"; + break; } break; }