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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 // TODO(scottmg): Not sure if there's anything equivalent on Windows. | 151 // TODO(scottmg): Not sure if there's anything equivalent on Windows. |
151 *uuid = crashpad::UUID(); | 152 *uuid = crashpad::UUID(); |
152 } | 153 } |
153 | 154 |
154 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const { | 155 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const { |
155 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 156 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
156 CHECK(false) << "TODO(scottmg)"; | 157 // These correspond to system-logged things on Mac. We don't currently track |
158 // any of these on Windows, but could in the future. | |
Robert Sesek
2015/05/14 18:55:27
Is this worth filing a bug for?
scottmg
2015/05/14 19:10:02
Good idea, https://code.google.com/p/crashpad/issu
| |
157 return std::vector<std::string>(); | 159 return std::vector<std::string>(); |
158 } | 160 } |
159 | 161 |
160 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap() | 162 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap() |
161 const { | 163 const { |
162 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 164 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
163 CHECK(false) << "TODO(scottmg)"; | 165 PEImageAnnotationsReader annotations_reader( |
164 return std::map<std::string, std::string>(); | 166 process_reader_, pe_image_reader_.get(), name_); |
167 return annotations_reader.SimpleMap(); | |
165 } | 168 } |
166 | 169 |
167 } // namespace internal | 170 } // namespace internal |
168 } // namespace crashpad | 171 } // namespace crashpad |
OLD | NEW |