Add a crash reason string for the simulated crashpad exception code

BUG=

Change-Id: I19a1abf1d00f208943db1c362cc426ca8bd2068e
Reviewed-on: https://chromium-review.googlesource.com/409632
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Pierre-Antoine Manzagol 2016-11-10 09:03:31 -05:00 committed by Mark Mentovai
parent 2f6cb866d6
commit 4eb76cbc9e
3 changed files with 14 additions and 3 deletions

View file

@ -34,7 +34,7 @@
*
* Author: Mark Mentovai
* Split into its own file: Neal Sidhwaney */
#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__
#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__
@ -65,8 +65,10 @@ typedef enum {
/* EXC_SYSCALL */
MD_EXCEPTION_MAC_MACH_SYSCALL = 8,
/* EXC_MACH_SYSCALL */
MD_EXCEPTION_MAC_RPC_ALERT = 9
MD_EXCEPTION_MAC_RPC_ALERT = 9,
/* EXC_RPC_ALERT */
MD_EXCEPTION_MAC_SIMULATED = 0x43507378
/* Fake exception code used by Crashpad's SimulateCrash ('CPsx'). */
} MDExceptionMac;
/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X

View file

@ -105,9 +105,12 @@ typedef enum {
MD_EXCEPTION_OUT_OF_MEMORY = 0xe0000008,
/* Exception thrown by Chromium allocators to indicate OOM.
See base/process/memory.h in Chromium for rationale. */
MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363
MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363,
/* Per http://support.microsoft.com/kb/185294,
generated by Visual C++ compiler */
MD_EXCEPTION_CODE_WIN_SIMULATED = 0x0517a7ed
/* Fake exception code used by Crashpad's
CrashpadClient::DumpWithoutCrash. */
} MDExceptionCodeWin;

View file

@ -1028,6 +1028,9 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
reason = "EXC_RPC_ALERT / ";
reason.append(flags_string);
break;
case MD_EXCEPTION_MAC_SIMULATED:
reason = "Simulated Exception";
break;
}
break;
}
@ -1195,6 +1198,9 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
case MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION:
reason = "Unhandled C++ Exception";
break;
case MD_EXCEPTION_CODE_WIN_SIMULATED:
reason = "Simulated Exception";
break;
default:
BPLOG(INFO) << "Unknown exception reason " << reason;
break;