aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2016-03-29 15:32:47 -0400
committerTed Mielczarek <ted@mielczarek.org>2016-03-29 15:32:47 -0400
commitd091e5103f3a9305b56d5aa9ef18e18306d32786 (patch)
tree86a3db027d709035b6966568e28651f8f8352d6b /src/processor
parentHave dump_syms output the full symbol table. (diff)
downloadbreakpad-d091e5103f3a9305b56d5aa9ef18e18306d32786.tar.xz
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 .
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/minidump_processor.cc26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc
index 91468560..b7d7a0d9 100644
--- a/src/processor/minidump_processor.cc
+++ b/src/processor/minidump_processor.cc
@@ -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: