Chromium Code Reviews| 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_SNAPSHOT_THREAD_SNAPSHOT_H_ | |
| 16 #define CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ | |
| 17 | |
| 18 #include <stdint.h> | |
| 19 | |
| 20 namespace crashpad { | |
| 21 | |
| 22 class CPUContext; | |
| 23 class MemorySnapshot; | |
| 24 | |
| 25 //! \brief An abstract interface to a snapshot representing a thread | |
| 26 //! (lightweight process) present in a snapshot process. | |
| 27 class ThreadSnapshot { | |
| 28 public: | |
| 29 //! \brief Returns a CPUContext object corresponding to the thread’s CPU | |
| 30 //! context. | |
| 31 //! | |
| 32 //! The caller does not take this object, it is scoped to the lifetime of the | |
|
Robert Sesek
2014/09/25 15:44:09
s/take/own
| |
| 33 //! ThreadSnapshot object that it was obtained from. | |
| 34 virtual const CPUContext* Context() = 0; | |
| 35 | |
| 36 //! \brief Returns a MemorySnapshot object corresponding to the memory region | |
| 37 //! that contains the thread’s stack. | |
| 38 //! | |
| 39 //! The caller does not take this object, it is scoped to the lifetime of the | |
|
Robert Sesek
2014/09/25 15:44:09
s/take/own
| |
| 40 //! ThreadSnapshot object that it was obtained from. | |
| 41 virtual MemorySnapshot* Stack() = 0; | |
| 42 | |
| 43 //! \brief Returns the thread’s identifier. | |
| 44 //! | |
| 45 //! Thread identifiers are at least unique within a process, and may be unique | |
| 46 //! system-wide. | |
| 47 virtual uint64_t ThreadID() = 0; | |
| 48 | |
| 49 //! \brief Returns the thread’s suspend count. | |
| 50 //! | |
| 51 //! A suspend count of `0` denotes a schedulable (not suspended) thread. | |
| 52 virtual int SuspendCount() = 0; | |
| 53 | |
| 54 //! \brief Returns the thread’s priority. | |
| 55 //! | |
| 56 //! Threads with higher priorities will have higher priority values. | |
| 57 virtual int Priority() = 0; | |
| 58 | |
| 59 //! \brief Returns the base address of a region used to store thread-specific | |
| 60 //! data. | |
| 61 virtual uint64_t ThreadSpecificDataAddress() = 0; | |
| 62 | |
| 63 protected: | |
| 64 ~ThreadSnapshot() {} | |
| 65 }; | |
| 66 | |
| 67 } // namespace crashpad | |
| 68 | |
| 69 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ | |
| OLD | NEW |