Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: tools/catch_exception_tool.cc

Issue 566693003: ExcCrashRecoverOriginalException() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | util/mach/exc_server_variants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/catch_exception_tool.cc
diff --git a/tools/catch_exception_tool.cc b/tools/catch_exception_tool.cc
index 2cc547c7df21394e2bb2816311807cede1a05221..69447f758c0b69e6f359ab660f3ecaa367ea8dea 100644
--- a/tools/catch_exception_tool.cc
+++ b/tools/catch_exception_tool.cc
@@ -117,20 +117,16 @@ class ExceptionServer : public UniversalMachExcServer {
}
if (exception == EXC_CRASH) {
- // 10.9.4 xnu-2422.110.17/bsd/kern/kern_exit.c proc_prepareexit() sets
- // code[0] based on the signal value, original exception type, and low 20
- // bits of the original code[0] before calling
- // xnu-2422.110.17/osfmk/kern/exception.c task_exception_notify() to raise
- // an EXC_CRASH.
- int sig = (code[0] >> 24) & 0xff;
- int orig_exception = (code[0] >> 20) & 0xf;
- int orig_code_0 = code[0] & 0xfffff;
+ mach_exception_data_type_t original_code_0;
+ int signal;
+ exception_type_t original_exception =
+ ExcCrashRecoverOriginalException(code[0], &original_code_0, &signal);
fprintf(options_.file,
- ", original exception %s, original code0 %d, signal %s",
- ExceptionToString(orig_exception,
+ ", original exception %s, original code[0] %lld, signal %s",
+ ExceptionToString(original_exception,
kUseFullName | kUnknownIsNumeric).c_str(),
- orig_code_0,
- SignalToString(sig, kUseFullName | kUnknownIsNumeric).c_str());
+ original_code_0,
+ SignalToString(signal, kUseFullName | kUnknownIsNumeric).c_str());
}
fprintf(options_.file, "\n");
« no previous file with comments | « no previous file | util/mach/exc_server_variants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698