| 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_THREAD_SNAPSHOT_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ |
| 16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ | 16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ |
| 17 | 17 |
| 18 #include <stdint.h> | 18 #include <stdint.h> |
| 19 | 19 |
| 20 namespace crashpad { | 20 namespace crashpad { |
| 21 | 21 |
| 22 struct CPUContext; | 22 struct CPUContext; |
| 23 class MemorySnapshot; | 23 class MemorySnapshot; |
| 24 | 24 |
| 25 //! \brief An abstract interface to a snapshot representing a thread | 25 //! \brief An abstract interface to a snapshot representing a thread |
| 26 //! (lightweight process) present in a snapshot process. | 26 //! (lightweight process) present in a snapshot process. |
| 27 class ThreadSnapshot { | 27 class ThreadSnapshot { |
| 28 public: | 28 public: |
| 29 virtual ~ThreadSnapshot() {} |
| 30 |
| 29 //! \brief Returns a CPUContext object corresponding to the thread’s CPU | 31 //! \brief Returns a CPUContext object corresponding to the thread’s CPU |
| 30 //! context. | 32 //! context. |
| 31 //! | 33 //! |
| 32 //! The caller does not take ownership of this object, it is scoped to the | 34 //! The caller does not take ownership of this object, it is scoped to the |
| 33 //! lifetime of the ThreadSnapshot object that it was obtained from. | 35 //! lifetime of the ThreadSnapshot object that it was obtained from. |
| 34 virtual const CPUContext* Context() const = 0; | 36 virtual const CPUContext* Context() const = 0; |
| 35 | 37 |
| 36 //! \brief Returns a MemorySnapshot object corresponding to the memory region | 38 //! \brief Returns a MemorySnapshot object corresponding to the memory region |
| 37 //! that contains the thread’s stack. | 39 //! that contains the thread’s stack. |
| 38 //! | 40 //! |
| (...skipping 13 matching lines...) Expand all Loading... |
| 52 virtual int SuspendCount() const = 0; | 54 virtual int SuspendCount() const = 0; |
| 53 | 55 |
| 54 //! \brief Returns the thread’s priority. | 56 //! \brief Returns the thread’s priority. |
| 55 //! | 57 //! |
| 56 //! Threads with higher priorities will have higher priority values. | 58 //! Threads with higher priorities will have higher priority values. |
| 57 virtual int Priority() const = 0; | 59 virtual int Priority() const = 0; |
| 58 | 60 |
| 59 //! \brief Returns the base address of a region used to store thread-specific | 61 //! \brief Returns the base address of a region used to store thread-specific |
| 60 //! data. | 62 //! data. |
| 61 virtual uint64_t ThreadSpecificDataAddress() const = 0; | 63 virtual uint64_t ThreadSpecificDataAddress() const = 0; |
| 62 | |
| 63 protected: | |
| 64 ~ThreadSnapshot() {} | |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace crashpad | 66 } // namespace crashpad |
| 68 | 67 |
| 69 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ | 68 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ |
| OLD | NEW |