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 #include <vector> |
| 21 |
20 namespace crashpad { | 22 namespace crashpad { |
21 | 23 |
22 struct CPUContext; | 24 struct CPUContext; |
23 class MemorySnapshot; | 25 class MemorySnapshot; |
24 | 26 |
25 //! \brief An abstract interface to a snapshot representing a thread | 27 //! \brief An abstract interface to a snapshot representing a thread |
26 //! (lightweight process) present in a snapshot process. | 28 //! (lightweight process) present in a snapshot process. |
27 class ThreadSnapshot { | 29 class ThreadSnapshot { |
28 public: | 30 public: |
29 virtual ~ThreadSnapshot() {} | 31 virtual ~ThreadSnapshot() {} |
(...skipping 25 matching lines...) Expand all Loading... |
55 virtual int SuspendCount() const = 0; | 57 virtual int SuspendCount() const = 0; |
56 | 58 |
57 //! \brief Returns the thread’s priority. | 59 //! \brief Returns the thread’s priority. |
58 //! | 60 //! |
59 //! Threads with higher priorities will have higher priority values. | 61 //! Threads with higher priorities will have higher priority values. |
60 virtual int Priority() const = 0; | 62 virtual int Priority() const = 0; |
61 | 63 |
62 //! \brief Returns the base address of a region used to store thread-specific | 64 //! \brief Returns the base address of a region used to store thread-specific |
63 //! data. | 65 //! data. |
64 virtual uint64_t ThreadSpecificDataAddress() const = 0; | 66 virtual uint64_t ThreadSpecificDataAddress() const = 0; |
| 67 |
| 68 //! \brief Returns a vector of additional memory blocks that should be |
| 69 //! included in a minidump. |
| 70 //! |
| 71 //! \return A vector of MemorySnapshot objects that will be included in the |
| 72 //! crash dump. The caller does not take ownership of these objects, they |
| 73 //! are scoped to the lifetime of the ThreadSnapshot object that they |
| 74 //! were obtained from. |
| 75 virtual std::vector<const MemorySnapshot*> ExtraMemory() const = 0; |
65 }; | 76 }; |
66 | 77 |
67 } // namespace crashpad | 78 } // namespace crashpad |
68 | 79 |
69 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ | 80 #endif // CRASHPAD_SNAPSHOT_THREAD_SNAPSHOT_H_ |
OLD | NEW |