mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 17:05:45 +01:00
processor: add arm exception flags
From inspection of Apple headers and https://llvm.org/svn/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Review: https://breakpad.appspot.com/457003/ Patch by: jaysoffian@gmail.com git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1048 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
3500120c1f
commit
6446cfcff0
@ -93,6 +93,16 @@ typedef enum {
|
|||||||
/* Custom values */
|
/* Custom values */
|
||||||
MD_EXCEPTION_CODE_MAC_NS_EXCEPTION = 0xDEADC0DE, /* uncaught NSException */
|
MD_EXCEPTION_CODE_MAC_NS_EXCEPTION = 0xDEADC0DE, /* uncaught NSException */
|
||||||
|
|
||||||
|
/* With MD_EXCEPTION_MAC_BAD_ACCESS on arm */
|
||||||
|
MD_EXCEPTION_CODE_MAC_ARM_DA_ALIGN = 0x0101, /* EXC_ARM_DA_ALIGN */
|
||||||
|
MD_EXCEPTION_CODE_MAC_ARM_DA_DEBUG = 0x0102, /* EXC_ARM_DA_DEBUG */
|
||||||
|
|
||||||
|
/* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on arm */
|
||||||
|
MD_EXCEPTION_CODE_MAC_ARM_UNDEFINED = 1, /* EXC_ARM_UNDEFINED */
|
||||||
|
|
||||||
|
/* With MD_EXCEPTION_MAC_BREAKPOINT on arm */
|
||||||
|
MD_EXCEPTION_CODE_MAC_ARM_BREAKPOINT = 1, /* EXC_ARM_BREAKPOINT */
|
||||||
|
|
||||||
/* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */
|
/* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */
|
||||||
MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101,
|
MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101,
|
||||||
/* EXC_PPC_VM_PROT_READ */
|
/* EXC_PPC_VM_PROT_READ */
|
||||||
|
@ -484,26 +484,61 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) {
|
|||||||
case MD_EXCEPTION_CODE_MAC_MEMORY_ERROR:
|
case MD_EXCEPTION_CODE_MAC_MEMORY_ERROR:
|
||||||
reason.append("KERN_MEMORY_ERROR");
|
reason.append("KERN_MEMORY_ERROR");
|
||||||
break;
|
break;
|
||||||
// These are ppc only but shouldn't be a problem as they're
|
|
||||||
// unused on x86
|
|
||||||
case MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ:
|
|
||||||
reason.append("EXC_PPC_VM_PROT_READ");
|
|
||||||
break;
|
|
||||||
case MD_EXCEPTION_CODE_MAC_PPC_BADSPACE:
|
|
||||||
reason.append("EXC_PPC_BADSPACE");
|
|
||||||
break;
|
|
||||||
case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED:
|
|
||||||
reason.append("EXC_PPC_UNALIGNED");
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
reason.append(flags_string);
|
// arm and ppc overlap
|
||||||
BPLOG(INFO) << "Unknown exception reason " << reason;
|
if (raw_system_info->processor_architecture ==
|
||||||
|
MD_CPU_ARCHITECTURE_ARM) {
|
||||||
|
switch (exception_flags) {
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_DA_ALIGN:
|
||||||
|
reason.append("EXC_ARM_DA_ALIGN");
|
||||||
|
break;
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_DA_DEBUG:
|
||||||
|
reason.append("EXC_ARM_DA_DEBUG");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reason.append(flags_string);
|
||||||
|
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (raw_system_info->processor_architecture ==
|
||||||
|
MD_CPU_ARCHITECTURE_PPC) {
|
||||||
|
switch (exception_flags) {
|
||||||
|
case MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ:
|
||||||
|
reason.append("EXC_PPC_VM_PROT_READ");
|
||||||
|
break;
|
||||||
|
case MD_EXCEPTION_CODE_MAC_PPC_BADSPACE:
|
||||||
|
reason.append("EXC_PPC_BADSPACE");
|
||||||
|
break;
|
||||||
|
case MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED:
|
||||||
|
reason.append("EXC_PPC_UNALIGNED");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reason.append(flags_string);
|
||||||
|
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
reason.append(flags_string);
|
||||||
|
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MD_EXCEPTION_MAC_BAD_INSTRUCTION:
|
case MD_EXCEPTION_MAC_BAD_INSTRUCTION:
|
||||||
reason = "EXC_BAD_INSTRUCTION / ";
|
reason = "EXC_BAD_INSTRUCTION / ";
|
||||||
switch (raw_system_info->processor_architecture) {
|
switch (raw_system_info->processor_architecture) {
|
||||||
|
case MD_CPU_ARCHITECTURE_ARM: {
|
||||||
|
switch (exception_flags) {
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_UNDEFINED:
|
||||||
|
reason.append("EXC_ARM_UNDEFINED");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reason.append(flags_string);
|
||||||
|
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MD_CPU_ARCHITECTURE_PPC: {
|
case MD_CPU_ARCHITECTURE_PPC: {
|
||||||
switch (exception_flags) {
|
switch (exception_flags) {
|
||||||
case MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL:
|
case MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL:
|
||||||
@ -671,6 +706,24 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, u_int64_t *address) {
|
|||||||
case MD_EXCEPTION_MAC_BREAKPOINT:
|
case MD_EXCEPTION_MAC_BREAKPOINT:
|
||||||
reason = "EXC_BREAKPOINT / ";
|
reason = "EXC_BREAKPOINT / ";
|
||||||
switch (raw_system_info->processor_architecture) {
|
switch (raw_system_info->processor_architecture) {
|
||||||
|
case MD_CPU_ARCHITECTURE_ARM: {
|
||||||
|
switch (exception_flags) {
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_DA_ALIGN:
|
||||||
|
reason.append("EXC_ARM_DA_ALIGN");
|
||||||
|
break;
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_DA_DEBUG:
|
||||||
|
reason.append("EXC_ARM_DA_DEBUG");
|
||||||
|
break;
|
||||||
|
case MD_EXCEPTION_CODE_MAC_ARM_BREAKPOINT:
|
||||||
|
reason.append("EXC_ARM_BREAKPOINT");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reason.append(flags_string);
|
||||||
|
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case MD_CPU_ARCHITECTURE_PPC: {
|
case MD_CPU_ARCHITECTURE_PPC: {
|
||||||
switch (exception_flags) {
|
switch (exception_flags) {
|
||||||
case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT:
|
case MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT:
|
||||||
|
Loading…
Reference in New Issue
Block a user