OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 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_WIN_THREAD_SNAPSHOT_WIN_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_ |
16 #define CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_ | 16 #define CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_ |
17 | 17 |
18 #include <stdint.h> | 18 #include <stdint.h> |
19 | 19 |
| 20 #include <vector> |
| 21 |
20 #include "base/basictypes.h" | 22 #include "base/basictypes.h" |
21 #include "snapshot/cpu_context.h" | 23 #include "snapshot/cpu_context.h" |
22 #include "snapshot/memory_snapshot.h" | 24 #include "snapshot/memory_snapshot.h" |
23 #include "snapshot/thread_snapshot.h" | 25 #include "snapshot/thread_snapshot.h" |
24 #include "snapshot/win/memory_snapshot_win.h" | 26 #include "snapshot/win/memory_snapshot_win.h" |
25 #include "snapshot/win/process_reader_win.h" | 27 #include "snapshot/win/process_reader_win.h" |
26 #include "util/misc/initialization_state_dcheck.h" | 28 #include "util/misc/initialization_state_dcheck.h" |
| 29 #include "util/stdlib/pointer_container.h" |
27 | 30 |
28 namespace crashpad { | 31 namespace crashpad { |
29 | 32 |
30 class ProcessReaderWin; | 33 class ProcessReaderWin; |
31 | 34 |
32 namespace internal { | 35 namespace internal { |
33 | 36 |
34 //! \brief A ThreadSnapshot of a thread in a running (or crashed) process on a | 37 //! \brief A ThreadSnapshot of a thread in a running (or crashed) process on a |
35 //! Windows system. | 38 //! Windows system. |
36 class ThreadSnapshotWin final : public ThreadSnapshot { | 39 class ThreadSnapshotWin final : public ThreadSnapshot { |
(...skipping 14 matching lines...) Expand all Loading... |
51 const ProcessReaderWin::Thread& process_reader_thread); | 54 const ProcessReaderWin::Thread& process_reader_thread); |
52 | 55 |
53 // ThreadSnapshot: | 56 // ThreadSnapshot: |
54 | 57 |
55 const CPUContext* Context() const override; | 58 const CPUContext* Context() const override; |
56 const MemorySnapshot* Stack() const override; | 59 const MemorySnapshot* Stack() const override; |
57 uint64_t ThreadID() const override; | 60 uint64_t ThreadID() const override; |
58 int SuspendCount() const override; | 61 int SuspendCount() const override; |
59 int Priority() const override; | 62 int Priority() const override; |
60 uint64_t ThreadSpecificDataAddress() const override; | 63 uint64_t ThreadSpecificDataAddress() const override; |
| 64 std::vector<const MemorySnapshot*> ExtraMemory() const override; |
61 | 65 |
62 private: | 66 private: |
63 #if defined(ARCH_CPU_X86_FAMILY) | 67 #if defined(ARCH_CPU_X86_FAMILY) |
64 union { | 68 union { |
65 CPUContextX86 x86; | 69 CPUContextX86 x86; |
66 CPUContextX86_64 x86_64; | 70 CPUContextX86_64 x86_64; |
67 } context_union_; | 71 } context_union_; |
68 #endif | 72 #endif |
69 CPUContext context_; | 73 CPUContext context_; |
70 MemorySnapshotWin stack_; | 74 MemorySnapshotWin stack_; |
| 75 internal::MemorySnapshotWin teb_; |
71 ProcessReaderWin::Thread thread_; | 76 ProcessReaderWin::Thread thread_; |
72 InitializationStateDcheck initialized_; | 77 InitializationStateDcheck initialized_; |
73 | 78 |
74 DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotWin); | 79 DISALLOW_COPY_AND_ASSIGN(ThreadSnapshotWin); |
75 }; | 80 }; |
76 | 81 |
77 } // namespace internal | 82 } // namespace internal |
78 } // namespace crashpad | 83 } // namespace crashpad |
79 | 84 |
80 #endif // CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_ | 85 #endif // CRASHPAD_SNAPSHOT_WIN_THREAD_SNAPSHOT_WIN_H_ |
OLD | NEW |