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

Unified Diff: util/mach/symbolic_constants_mach.cc

Issue 565793005: Add exception_behaviors and its test (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 | « util/mach/exception_behaviors_test.cc ('k') | util/util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/symbolic_constants_mach.cc
diff --git a/util/mach/symbolic_constants_mach.cc b/util/mach/symbolic_constants_mach.cc
index 0efb54090ec797e5b17157751c20f50595c4c3bb..4bba92af2075481ee913998bc867c4241b1efd9e 100644
--- a/util/mach/symbolic_constants_mach.cc
+++ b/util/mach/symbolic_constants_mach.cc
@@ -18,6 +18,7 @@
#include "base/basictypes.h"
#include "base/strings/stringprintf.h"
+#include "util/mach/exception_behaviors.h"
#include "util/mach/mach_extensions.h"
#include "util/stdlib/string_number_conversion.h"
@@ -357,8 +358,7 @@ bool StringToExceptionMask(const base::StringPiece& string,
std::string ExceptionBehaviorToString(exception_behavior_t behavior,
SymbolicConstantToStringOptions options) {
- bool mach_exception_codes = behavior & MACH_EXCEPTION_CODES;
- exception_behavior_t basic_behavior = behavior & ~MACH_EXCEPTION_CODES;
+ const exception_behavior_t basic_behavior = ExceptionBehaviorBasic(behavior);
const char* behavior_name =
static_cast<size_t>(basic_behavior) < arraysize(kBehaviorNames)
@@ -379,7 +379,7 @@ std::string ExceptionBehaviorToString(exception_behavior_t behavior,
"%s%s", kBehaviorPrefix, behavior_name));
}
- if (mach_exception_codes) {
+ if (ExceptionBehaviorHasMachExceptionCodes(behavior)) {
behavior_string.append("|");
behavior_string.append((options & kUseShortName) ? kMachExceptionCodesShort
: kMachExceptionCodesFull);
« no previous file with comments | « util/mach/exception_behaviors_test.cc ('k') | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698