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

Unified Diff: compat/mac/mach/mach.h

Issue 432843002: Add compat to Crashpad (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Comment on the UTF-16 byte ordering in MINIDUMP_STRING Created 6 years, 5 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 | « compat/mac/mach-o/loader.h ('k') | compat/mac/servers/bootstrap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compat/mac/mach/mach.h
diff --git a/compat/mac/mach/mach.h b/compat/mac/mach/mach.h
new file mode 100644
index 0000000000000000000000000000000000000000..22b9ad8b025ccc50a942f7012fd696e51cc727a9
--- /dev/null
+++ b/compat/mac/mach/mach.h
@@ -0,0 +1,90 @@
+// Copyright 2014 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef CRASHPAD_COMPAT_MAC_MACH_MACH_H_
+#define CRASHPAD_COMPAT_MAC_MACH_MACH_H_
+
+#include_next <mach/mach.h>
+
+// <mach/exception_types.h>
+
+// 10.8 SDK
+
+#ifndef EXC_RESOURCE
+#define EXC_RESOURCE 11
+#endif
+
+#ifndef EXC_MASK_RESOURCE
+#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
+#endif
+
+// 10.9 SDK
+
+#ifndef EXC_GUARD
+#define EXC_GUARD 12
+#endif
+
+#ifndef EXC_MASK_GUARD
+#define EXC_MASK_GUARD (1 << EXC_GUARD)
+#endif
+
+// Don’t expose EXC_MASK_ALL or EXC_MASK_VALID at all, because their definitions
+// vary with SDK, and older kernels will reject values that they don’t
+// understand. Instead, use crashpad::ExcMaskAll(), which computes the correct
+// value of EXC_MASK_ALL for the running system.
+#undef EXC_MASK_ALL
+#undef EXC_MASK_VALID
+
+#if defined(__i386__) || defined(__x86_64__)
+
+// <mach/i386/exception.h>
+
+// 10.9 SDK
+
+#if EXC_TYPES_COUNT > 13 // Definition varies with SDK
+#error Update this file for new exception types
+#elif EXC_TYPES_COUNT != 13
+#undef EXC_TYPES_COUNT
+#define EXC_TYPES_COUNT 13
+#endif
+
+// <mach/i386/thread_status.h>
+
+// 10.6 SDK
+
+#ifndef x86_AVX_STATE32
+#define x86_AVX_STATE32 16
+#endif
+
+#ifndef x86_AVX_STATE64
+#define x86_AVX_STATE64 17
+#endif
+
+// 10.8 SDK
+
+#ifndef x86_AVX_STATE
+#define x86_AVX_STATE 18
+#endif
+
+#endif // defined(__i386__) || defined(__x86_64__)
+
+// <mach/thread_status.h>
+
+// 10.8 SDK
+
+#ifndef THREAD_STATE_FLAVOR_LIST_10_9
+#define THREAD_STATE_FLAVOR_LIST_10_9 129
+#endif
+
+#endif // CRASHPAD_COMPAT_MAC_MACH_MACH_H_
« no previous file with comments | « compat/mac/mach-o/loader.h ('k') | compat/mac/servers/bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698