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_PROCESS_SNAPSHOT_WIN_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ |
16 #define CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ | 16 #define CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ |
17 | 17 |
18 #include <windows.h> | 18 #include <windows.h> |
19 #include <sys/time.h> | 19 #include <sys/time.h> |
20 | 20 |
21 #include <map> | 21 #include <map> |
22 #include <string> | 22 #include <string> |
23 #include <vector> | 23 #include <vector> |
24 | 24 |
25 #include "base/basictypes.h" | 25 #include "base/basictypes.h" |
26 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
27 #include "client/crashpad_info.h" | 27 #include "client/crashpad_info.h" |
28 #include "snapshot/crashpad_info_client_options.h" | 28 #include "snapshot/crashpad_info_client_options.h" |
29 #include "snapshot/exception_snapshot.h" | 29 #include "snapshot/exception_snapshot.h" |
| 30 #include "snapshot/memory_map_snapshot.h" |
30 #include "snapshot/memory_snapshot.h" | 31 #include "snapshot/memory_snapshot.h" |
31 #include "snapshot/module_snapshot.h" | 32 #include "snapshot/module_snapshot.h" |
32 #include "snapshot/process_snapshot.h" | 33 #include "snapshot/process_snapshot.h" |
33 #include "snapshot/system_snapshot.h" | 34 #include "snapshot/system_snapshot.h" |
34 #include "snapshot/thread_snapshot.h" | 35 #include "snapshot/thread_snapshot.h" |
35 #include "snapshot/win/exception_snapshot_win.h" | 36 #include "snapshot/win/exception_snapshot_win.h" |
| 37 #include "snapshot/win/memory_map_snapshot_win.h" |
36 #include "snapshot/win/memory_snapshot_win.h" | 38 #include "snapshot/win/memory_snapshot_win.h" |
37 #include "snapshot/win/module_snapshot_win.h" | 39 #include "snapshot/win/module_snapshot_win.h" |
38 #include "snapshot/win/system_snapshot_win.h" | 40 #include "snapshot/win/system_snapshot_win.h" |
39 #include "snapshot/win/thread_snapshot_win.h" | 41 #include "snapshot/win/thread_snapshot_win.h" |
40 #include "util/misc/initialization_state_dcheck.h" | 42 #include "util/misc/initialization_state_dcheck.h" |
41 #include "util/misc/uuid.h" | 43 #include "util/misc/uuid.h" |
42 #include "util/win/address_types.h" | 44 #include "util/win/address_types.h" |
43 #include "util/win/process_structs.h" | 45 #include "util/win/process_structs.h" |
44 #include "util/stdlib/pointer_container.h" | 46 #include "util/stdlib/pointer_container.h" |
45 | 47 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 void ProcessStartTime(timeval* start_time) const override; | 121 void ProcessStartTime(timeval* start_time) const override; |
120 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; | 122 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; |
121 void ReportID(UUID* report_id) const override; | 123 void ReportID(UUID* report_id) const override; |
122 void ClientID(UUID* client_id) const override; | 124 void ClientID(UUID* client_id) const override; |
123 const std::map<std::string, std::string>& AnnotationsSimpleMap() | 125 const std::map<std::string, std::string>& AnnotationsSimpleMap() |
124 const override; | 126 const override; |
125 const SystemSnapshot* System() const override; | 127 const SystemSnapshot* System() const override; |
126 std::vector<const ThreadSnapshot*> Threads() const override; | 128 std::vector<const ThreadSnapshot*> Threads() const override; |
127 std::vector<const ModuleSnapshot*> Modules() const override; | 129 std::vector<const ModuleSnapshot*> Modules() const override; |
128 const ExceptionSnapshot* Exception() const override; | 130 const ExceptionSnapshot* Exception() const override; |
| 131 const MemoryMapSnapshot* MemoryMap() const override; |
129 std::vector<const MemorySnapshot*> ExtraMemory() const override; | 132 std::vector<const MemorySnapshot*> ExtraMemory() const override; |
130 | 133 |
131 private: | 134 private: |
132 // Initializes threads_ on behalf of Initialize(). | 135 // Initializes threads_ on behalf of Initialize(). |
133 void InitializeThreads(); | 136 void InitializeThreads(); |
134 | 137 |
135 // Initializes modules_ on behalf of Initialize(). | 138 // Initializes modules_ on behalf of Initialize(). |
136 void InitializeModules(); | 139 void InitializeModules(); |
137 | 140 |
138 // Initializes peb_memory_ on behalf of Initialize(). | 141 // Initializes peb_memory_ on behalf of Initialize(). |
(...skipping 16 matching lines...) Expand all Loading... |
155 PointerVector<internal::MemorySnapshotWin>* into); | 158 PointerVector<internal::MemorySnapshotWin>* into); |
156 | 159 |
157 WinVMSize DetermineSizeOfEnvironmentBlock( | 160 WinVMSize DetermineSizeOfEnvironmentBlock( |
158 WinVMAddress start_of_environment_block); | 161 WinVMAddress start_of_environment_block); |
159 | 162 |
160 internal::SystemSnapshotWin system_; | 163 internal::SystemSnapshotWin system_; |
161 PointerVector<internal::MemorySnapshotWin> peb_memory_; | 164 PointerVector<internal::MemorySnapshotWin> peb_memory_; |
162 PointerVector<internal::ThreadSnapshotWin> threads_; | 165 PointerVector<internal::ThreadSnapshotWin> threads_; |
163 PointerVector<internal::ModuleSnapshotWin> modules_; | 166 PointerVector<internal::ModuleSnapshotWin> modules_; |
164 scoped_ptr<internal::ExceptionSnapshotWin> exception_; | 167 scoped_ptr<internal::ExceptionSnapshotWin> exception_; |
| 168 internal::MemoryMapSnapshotWin memory_map_; |
165 ProcessReaderWin process_reader_; | 169 ProcessReaderWin process_reader_; |
166 UUID report_id_; | 170 UUID report_id_; |
167 UUID client_id_; | 171 UUID client_id_; |
168 std::map<std::string, std::string> annotations_simple_map_; | 172 std::map<std::string, std::string> annotations_simple_map_; |
169 timeval snapshot_time_; | 173 timeval snapshot_time_; |
170 InitializationStateDcheck initialized_; | 174 InitializationStateDcheck initialized_; |
171 | 175 |
172 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotWin); | 176 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotWin); |
173 }; | 177 }; |
174 | 178 |
175 } // namespace crashpad | 179 } // namespace crashpad |
176 | 180 |
177 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ | 181 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ |
OLD | NEW |