From bae7147e789f03462b02e213152beb7571ae4122 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 17 Jan 2023 10:50:44 -0500 Subject: [PATCH] Decode Mach EXC_RESOURCE and EXC_GUARD exception reasons Change-Id: Iafe85ae2149961f13ba44664c99e18d92d1ec654 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4172753 Reviewed-by: Mark Mentovai --- src/google_breakpad/common/minidump_exception_mac.h | 4 ++++ src/processor/minidump_processor.cc | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/google_breakpad/common/minidump_exception_mac.h b/src/google_breakpad/common/minidump_exception_mac.h index feb47079..acfafaa0 100644 --- a/src/google_breakpad/common/minidump_exception_mac.h +++ b/src/google_breakpad/common/minidump_exception_mac.h @@ -65,6 +65,10 @@ typedef enum { MD_EXCEPTION_MAC_MACH_SYSCALL = 8, /* EXC_MACH_SYSCALL */ MD_EXCEPTION_MAC_RPC_ALERT = 9, + /* EXC_RESOURCE */ + MD_EXCEPTION_MAC_RESOURCE = 11, + /* EXC_GUARD */ + MD_EXCEPTION_MAC_GUARD = 12, /* EXC_RPC_ALERT */ MD_EXCEPTION_MAC_SIMULATED = 0x43507378, /* Fake exception code used by Crashpad's SimulateCrash ('CPsx'). */ diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index bf561dfa..fb330e26 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -1243,6 +1243,14 @@ string MinidumpProcessor::GetCrashReason(Minidump* dump, uint64_t* address, reason = "EXC_RPC_ALERT / "; reason.append(flags_string); break; + case MD_EXCEPTION_MAC_RESOURCE: + reason = "EXC_RESOURCE / "; + reason.append(flags_string); + break; + case MD_EXCEPTION_MAC_GUARD: + reason = "EXC_GUARD / "; + reason.append(flags_string); + break; case MD_EXCEPTION_MAC_SIMULATED: reason = "Simulated Exception"; break;