OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at |
| 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. |
| 14 |
| 15 #ifndef CRASHPAD_COMPAT_MAC_MACH_MACH_H_ |
| 16 #define CRASHPAD_COMPAT_MAC_MACH_MACH_H_ |
| 17 |
| 18 #include_next <mach/mach.h> |
| 19 |
| 20 // <mach/exception_types.h> |
| 21 |
| 22 // 10.8 SDK |
| 23 |
| 24 #ifndef EXC_RESOURCE |
| 25 #define EXC_RESOURCE 11 |
| 26 #endif |
| 27 |
| 28 #ifndef EXC_MASK_RESOURCE |
| 29 #define EXC_MASK_RESOURCE (1 << EXC_RESOURCE) |
| 30 #endif |
| 31 |
| 32 // 10.9 SDK |
| 33 |
| 34 #ifndef EXC_GUARD |
| 35 #define EXC_GUARD 12 |
| 36 #endif |
| 37 |
| 38 #ifndef EXC_MASK_GUARD |
| 39 #define EXC_MASK_GUARD (1 << EXC_GUARD) |
| 40 #endif |
| 41 |
| 42 // Don’t expose EXC_MASK_ALL or EXC_MASK_VALID at all, because their definitions |
| 43 // vary with SDK, and older kernels will reject values that they don’t |
| 44 // understand. Instead, use crashpad::ExcMaskAll(), which computes the correct |
| 45 // value of EXC_MASK_ALL for the running system. |
| 46 #undef EXC_MASK_ALL |
| 47 #undef EXC_MASK_VALID |
| 48 |
| 49 #if defined(__i386__) || defined(__x86_64__) |
| 50 |
| 51 // <mach/i386/exception.h> |
| 52 |
| 53 // 10.9 SDK |
| 54 |
| 55 #if EXC_TYPES_COUNT > 13 // Definition varies with SDK |
| 56 #error Update this file for new exception types |
| 57 #elif EXC_TYPES_COUNT != 13 |
| 58 #undef EXC_TYPES_COUNT |
| 59 #define EXC_TYPES_COUNT 13 |
| 60 #endif |
| 61 |
| 62 // <mach/i386/thread_status.h> |
| 63 |
| 64 // 10.6 SDK |
| 65 |
| 66 #ifndef x86_AVX_STATE32 |
| 67 #define x86_AVX_STATE32 16 |
| 68 #endif |
| 69 |
| 70 #ifndef x86_AVX_STATE64 |
| 71 #define x86_AVX_STATE64 17 |
| 72 #endif |
| 73 |
| 74 // 10.8 SDK |
| 75 |
| 76 #ifndef x86_AVX_STATE |
| 77 #define x86_AVX_STATE 18 |
| 78 #endif |
| 79 |
| 80 #endif // defined(__i386__) || defined(__x86_64__) |
| 81 |
| 82 // <mach/thread_status.h> |
| 83 |
| 84 // 10.8 SDK |
| 85 |
| 86 #ifndef THREAD_STATE_FLAVOR_LIST_10_9 |
| 87 #define THREAD_STATE_FLAVOR_LIST_10_9 129 |
| 88 #endif |
| 89 |
| 90 #endif // CRASHPAD_COMPAT_MAC_MACH_MACH_H_ |
OLD | NEW |