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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 //! processed as `EXC_CRASH` when generated from another preceding exception: | 53 //! processed as `EXC_CRASH` when generated from another preceding exception: |
54 //! the original exception code will appear instead. The exception type as it | 54 //! the original exception code will appear instead. The exception type as it |
55 //! was received will appear at index 0 of Codes(). | 55 //! was received will appear at index 0 of Codes(). |
56 virtual uint32_t Exception() const = 0; | 56 virtual uint32_t Exception() const = 0; |
57 | 57 |
58 //! \brief Returns the second-level exception code identifying the exception. | 58 //! \brief Returns the second-level exception code identifying the exception. |
59 //! | 59 //! |
60 //! This is an operating system-specific value. | 60 //! This is an operating system-specific value. |
61 //! | 61 //! |
62 //! For Mac OS X, this will be the value of the exception code at index 0 as | 62 //! For Mac OS X, this will be the value of the exception code at index 0 as |
63 //! received by a Mach exception handler. For `EXC_CRASH` exceptions generated | 63 //! received by a Mach exception handler, except: |
64 //! from another preceding exception, the original exception code will appear | 64 //! * For `EXC_CRASH` exceptions generated from another preceding exception, |
65 //! here, not the code as received by the Mach exception handler. The code as | 65 //! the original exception code will appear here, not the code as received |
66 //! it was received will appear at index 1 of Codes(). | 66 //! by the Mach exception handler. |
| 67 //! * For `EXC_RESOURCE` and `EXC_GUARD` exceptions, the high 32 bits of the |
| 68 //! exception code at index 0 will appear here. |
| 69 //! |
| 70 //! In all cases on Mac OS X, the full exception code at index 0 as it was |
| 71 //! received will appear at index 1 of Codes(). |
67 virtual uint32_t ExceptionInfo() const = 0; | 72 virtual uint32_t ExceptionInfo() const = 0; |
68 | 73 |
69 //! \brief Returns the address that triggered the exception. | 74 //! \brief Returns the address that triggered the exception. |
70 //! | 75 //! |
71 //! This may be the address that caused a fault on data access, or it may be | 76 //! This may be the address that caused a fault on data access, or it may be |
72 //! the instruction pointer that contained an offending instruction. For | 77 //! the instruction pointer that contained an offending instruction. For |
73 //! exceptions where this value cannot be determined, it will be `0`. | 78 //! exceptions where this value cannot be determined, it will be `0`. |
74 //! | 79 //! |
75 //! For Mac OS X, this will be the value of the exception code at index 1 as | 80 //! For Mac OS X, this will be the value of the exception code at index 1 as |
76 //! received by a Mach exception handler. | 81 //! received by a Mach exception handler. |
77 virtual uint64_t ExceptionAddress() const = 0; | 82 virtual uint64_t ExceptionAddress() const = 0; |
78 | 83 |
79 //! \brief Returns a series of operating system-specific exception codes. | 84 //! \brief Returns a series of operating system-specific exception codes. |
80 //! | 85 //! |
81 //! The precise interpretation of these codes is specific to the snapshot | 86 //! The precise interpretation of these codes is specific to the snapshot |
82 //! operating system. These codes may provide a duplicate of information | 87 //! operating system. These codes may provide a duplicate of information |
83 //! available elsewhere, they may extend information available elsewhere, or | 88 //! available elsewhere, they may extend information available elsewhere, or |
84 //! they may not be present at all. In this case, an empty vector will be | 89 //! they may not be present at all. In this case, an empty vector will be |
85 //! returned. | 90 //! returned. |
86 //! | 91 //! |
87 //! For Mac OS X, this will be a vector containing the original exception type | 92 //! For Mac OS X, this will be a vector containing the original exception type |
88 //! and the values of `code[0]` and `code[1]` as received by a Mach exception | 93 //! and the values of `code[0]` and `code[1]` as received by a Mach exception |
89 //! handler. | 94 //! handler. |
90 virtual const std::vector<uint64_t>& Codes() const = 0; | 95 virtual const std::vector<uint64_t>& Codes() const = 0; |
91 }; | 96 }; |
92 | 97 |
93 } // namespace crashpad | 98 } // namespace crashpad |
94 | 99 |
95 #endif // CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ | 100 #endif // CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ |
OLD | NEW |