| 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, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #ifndef CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ |
| 16 #define CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ | 16 #define CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ |
| 17 | 17 |
| 18 #include <stdint.h> | 18 #include <stdint.h> |
| 19 | 19 |
| 20 #include <vector> | 20 #include <vector> |
| 21 | 21 |
| 22 namespace crashpad { | 22 namespace crashpad { |
| 23 | 23 |
| 24 struct CPUContext; | 24 struct CPUContext; |
| 25 | 25 |
| 26 //! \brief An abstract interface to a snapshot representing an exception that a | 26 //! \brief An abstract interface to a snapshot representing an exception that a |
| 27 //! snapshot process sustained and triggered the snapshot being taken. | 27 //! snapshot process sustained and triggered the snapshot being taken. |
| 28 class ExceptionSnapshot { | 28 class ExceptionSnapshot { |
| 29 public: | 29 public: |
| 30 virtual ~ExceptionSnapshot() {} |
| 31 |
| 30 //! \brief Returns a CPUContext object corresponding to the exception thread’s | 32 //! \brief Returns a CPUContext object corresponding to the exception thread’s |
| 31 //! CPU context at the time of the exception. | 33 //! CPU context at the time of the exception. |
| 32 //! | 34 //! |
| 33 //! The caller does not take ownership of this object, it is scoped to the | 35 //! The caller does not take ownership of this object, it is scoped to the |
| 34 //! lifetime of the ThreadSnapshot object that it was obtained from. | 36 //! lifetime of the ThreadSnapshot object that it was obtained from. |
| 35 virtual const CPUContext* Context() const = 0; | 37 virtual const CPUContext* Context() const = 0; |
| 36 | 38 |
| 37 //! \brief Returns the thread identifier of the thread that triggered the | 39 //! \brief Returns the thread identifier of the thread that triggered the |
| 38 //! exception. | 40 //! exception. |
| 39 //! | 41 //! |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 //! The precise interpretation of these codes is specific to the snapshot | 81 //! The precise interpretation of these codes is specific to the snapshot |
| 80 //! operating system. These codes may provide a duplicate of information | 82 //! operating system. These codes may provide a duplicate of information |
| 81 //! available elsewhere, they may extend information available elsewhere, or | 83 //! available elsewhere, they may extend information available elsewhere, or |
| 82 //! they may not be present at all. In this case, an empty vector will be | 84 //! they may not be present at all. In this case, an empty vector will be |
| 83 //! returned. | 85 //! returned. |
| 84 //! | 86 //! |
| 85 //! For Mac OS X, this will be a vector containing the original exception type | 87 //! For Mac OS X, this will be a vector containing the original exception type |
| 86 //! and the values of `code[0]` and `code[1]` as received by a Mach exception | 88 //! and the values of `code[0]` and `code[1]` as received by a Mach exception |
| 87 //! handler. | 89 //! handler. |
| 88 virtual const std::vector<uint64_t>& Codes() const = 0; | 90 virtual const std::vector<uint64_t>& Codes() const = 0; |
| 89 | |
| 90 protected: | |
| 91 ~ExceptionSnapshot() {} | |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 } // namespace crashpad | 93 } // namespace crashpad |
| 95 | 94 |
| 96 #endif // CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ | 95 #endif // CRASHPAD_SNAPSHOT_EXCEPTION_SNAPSHOT_H_ |
| OLD | NEW |