OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with 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 | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 21 matching lines...) Expand all Loading... |
32 // exception_type_t, it’s reasonable to assume that there cannot be any | 32 // exception_type_t, it’s reasonable to assume that there cannot be any |
33 // officially-defined exception_type_t values higher than 31. | 33 // officially-defined exception_type_t values higher than 31. |
34 // kMachExceptionSimulated uses a value well outside this range because it does | 34 // kMachExceptionSimulated uses a value well outside this range because it does |
35 // not require a corresponding mask value. Simulated exceptions are delivered to | 35 // not require a corresponding mask value. Simulated exceptions are delivered to |
36 // the exception handler registered for EXC_CRASH exceptions using | 36 // the exception handler registered for EXC_CRASH exceptions using |
37 // EXC_MASK_CRASH. | 37 // EXC_MASK_CRASH. |
38 | 38 |
39 //! \brief An exception type to use for simulated exceptions. | 39 //! \brief An exception type to use for simulated exceptions. |
40 const exception_type_t kMachExceptionSimulated = 'CPsx'; | 40 const exception_type_t kMachExceptionSimulated = 'CPsx'; |
41 | 41 |
| 42 //! \brief The value for `EXC_MASK_ALL` appropriate for the operating system at |
| 43 //! run time. |
| 44 //! |
| 45 //! The SDK’s definition of `EXC_MASK_ALL` has changed over time, with later |
| 46 //! versions containing more bits set than earlier versions. However, older |
| 47 //! kernels will reject exception masks that contain bits set that they don’t |
| 48 //! recognize. Calling this function will return a value for `EXC_MASK_ALL` |
| 49 //! appropriate for the system at run time. |
| 50 //! |
| 51 //! \note `EXC_MASK_ALL` does not include the value of `EXC_MASK_CRASH`. |
| 52 exception_mask_t ExcMaskAll(); |
| 53 |
42 } // namespace crashpad | 54 } // namespace crashpad |
43 | 55 |
44 #endif // CRASHPAD_UTIL_MACH_MACH_EXTENSIONS_H_ | 56 #endif // CRASHPAD_UTIL_MACH_MACH_EXTENSIONS_H_ |
OLD | NEW |