mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-22 23:23:36 +00:00
Make EXC_BAD_ACCESS / EXC_I386_GPFLT print nicely in the processor
Currently EXC_BAD_ACCESS doesn't support EXC_I386_GPFLT as exception_flags for pretty-printing in the processor, but this happens for a lot of things: http://opensource.apple.com/source/xnu/xnu-2050.24.15/osfmk/i386/trap.c (search for EXC_I386_GPFLT). And we get a lot of these in the wild: https://crash-stats.mozilla.com/search/?reason=%3DEXC_BAD_ACCESS+%2F+0x0000000d&cpu_name=amd64&_facets=signature&_facets=address&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform&_columns=address#crash-reports This patch makes them show up with a nice name instead of the current "EXC_BAD_ACCESS / 0x0000000d". Additionally, this patch fixes some other cases where x86-64 wasn't being handled in the same way as x86, and fixes some x86-specific exception flags to be stringified with I386 in the output. R=mark@chromium.org BUG= Review URL: https://codereview.chromium.org/1833123002 .
This commit is contained in:
parent
512cac3a1b
commit
d091e5103f
1 changed files with 21 additions and 5 deletions
|
@ -745,6 +745,19 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
|
|||
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||
break;
|
||||
}
|
||||
} else if (raw_system_info->processor_architecture ==
|
||||
MD_CPU_ARCHITECTURE_X86 ||
|
||||
raw_system_info->processor_architecture ==
|
||||
MD_CPU_ARCHITECTURE_AMD64) {
|
||||
switch (exception_flags) {
|
||||
case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT:
|
||||
reason.append("EXC_I386_GPFLT");
|
||||
break;
|
||||
default:
|
||||
reason.append(flags_string);
|
||||
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
reason.append(flags_string);
|
||||
BPLOG(INFO) << "Unknown exception reason " << reason;
|
||||
|
@ -795,25 +808,26 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case MD_CPU_ARCHITECTURE_AMD64:
|
||||
case MD_CPU_ARCHITECTURE_X86: {
|
||||
switch (exception_flags) {
|
||||
case MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION:
|
||||
reason.append("EXC_I386_INVOP");
|
||||
break;
|
||||
case MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT:
|
||||
reason.append("EXC_INVTSSFLT");
|
||||
reason.append("EXC_I386_INVTSSFLT");
|
||||
break;
|
||||
case MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT:
|
||||
reason.append("EXC_SEGNPFLT");
|
||||
reason.append("EXC_I386_SEGNPFLT");
|
||||
break;
|
||||
case MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT:
|
||||
reason.append("EXC_STKFLT");
|
||||
reason.append("EXC_I386_STKFLT");
|
||||
break;
|
||||
case MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT:
|
||||
reason.append("EXC_GPFLT");
|
||||
reason.append("EXC_I386_GPFLT");
|
||||
break;
|
||||
case MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT:
|
||||
reason.append("EXC_ALIGNFLT");
|
||||
reason.append("EXC_I386_ALIGNFLT");
|
||||
break;
|
||||
default:
|
||||
reason.append(flags_string);
|
||||
|
@ -866,6 +880,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case MD_CPU_ARCHITECTURE_AMD64:
|
||||
case MD_CPU_ARCHITECTURE_X86: {
|
||||
switch (exception_flags) {
|
||||
case MD_EXCEPTION_CODE_MAC_X86_DIV:
|
||||
|
@ -966,6 +981,7 @@ string MinidumpProcessor::GetCrashReason(Minidump *dump, uint64_t *address) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case MD_CPU_ARCHITECTURE_AMD64:
|
||||
case MD_CPU_ARCHITECTURE_X86: {
|
||||
switch (exception_flags) {
|
||||
case MD_EXCEPTION_CODE_MAC_X86_SGL:
|
||||
|
|
Loading…
Reference in a new issue