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 #include "snapshot/win/module_snapshot_win.h" | 15 #include "snapshot/win/module_snapshot_win.h" |
16 | 16 |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "snapshot/win/pe_image_annotations_reader.h" |
18 #include "snapshot/win/pe_image_reader.h" | 19 #include "snapshot/win/pe_image_reader.h" |
19 #include "util/misc/tri_state.h" | 20 #include "util/misc/tri_state.h" |
20 #include "util/misc/uuid.h" | 21 #include "util/misc/uuid.h" |
21 #include "util/win/module_version.h" | 22 #include "util/win/module_version.h" |
22 | 23 |
23 namespace crashpad { | 24 namespace crashpad { |
24 namespace internal { | 25 namespace internal { |
25 | 26 |
26 ModuleSnapshotWin::ModuleSnapshotWin() | 27 ModuleSnapshotWin::ModuleSnapshotWin() |
27 : ModuleSnapshot(), | 28 : ModuleSnapshot(), |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return ModuleSnapshot::kModuleTypeUnknown; | 146 return ModuleSnapshot::kModuleTypeUnknown; |
146 } | 147 } |
147 | 148 |
148 void ModuleSnapshotWin::UUID(crashpad::UUID* uuid) const { | 149 void ModuleSnapshotWin::UUID(crashpad::UUID* uuid) const { |
149 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 150 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
150 CHECK(false) << "TODO(scottmg)"; | 151 CHECK(false) << "TODO(scottmg)"; |
151 } | 152 } |
152 | 153 |
153 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const { | 154 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const { |
154 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 155 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
155 CHECK(false) << "TODO(scottmg)"; | 156 // These correspond to system-logged things on Mac. We don't currently track |
| 157 // any of these on Windows, but could in the future. |
| 158 // See https://code.google.com/p/crashpad/issues/detail?id=38. |
156 return std::vector<std::string>(); | 159 return std::vector<std::string>(); |
157 } | 160 } |
158 | 161 |
159 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap() | 162 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap() |
160 const { | 163 const { |
161 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 164 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
162 CHECK(false) << "TODO(scottmg)"; | 165 PEImageAnnotationsReader annotations_reader( |
163 return std::map<std::string, std::string>(); | 166 process_reader_, pe_image_reader_.get(), name_); |
| 167 return annotations_reader.SimpleMap(); |
164 } | 168 } |
165 | 169 |
166 } // namespace internal | 170 } // namespace internal |
167 } // namespace crashpad | 171 } // namespace crashpad |
OLD | NEW |