Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Side by Side Diff: snapshot/win/module_snapshot_win.cc

Issue 1311003003: Implement ModuleSnapshotWin::UUID (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « snapshot/snapshot_test.gyp ('k') | snapshot/win/pe_image_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (ffi.dwFileType == VFT_DLL) 141 if (ffi.dwFileType == VFT_DLL)
142 return ModuleSnapshot::kModuleTypeSharedLibrary; 142 return ModuleSnapshot::kModuleTypeSharedLibrary;
143 if (ffi.dwFileType == VFT_DRV || ffi.dwFileType == VFT_VXD) 143 if (ffi.dwFileType == VFT_DRV || ffi.dwFileType == VFT_VXD)
144 return ModuleSnapshot::kModuleTypeLoadableModule; 144 return ModuleSnapshot::kModuleTypeLoadableModule;
145 } 145 }
146 return ModuleSnapshot::kModuleTypeUnknown; 146 return ModuleSnapshot::kModuleTypeUnknown;
147 } 147 }
148 148
149 void ModuleSnapshotWin::UUID(crashpad::UUID* uuid) const { 149 void ModuleSnapshotWin::UUID(crashpad::UUID* uuid) const {
150 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 150 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
151 CHECK(false) << "TODO(scottmg)"; 151 // TODO(scottmg): Also pass the age and pdbname through to snapshot?
152 DWORD age;
153 std::string pdbname;
154 if (!pe_image_reader_->DebugDirectoryInformation(uuid, &age, &pdbname))
155 *uuid = crashpad::UUID();
152 } 156 }
153 157
154 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const { 158 std::vector<std::string> ModuleSnapshotWin::AnnotationsVector() const {
155 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 159 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
156 // These correspond to system-logged things on Mac. We don't currently track 160 // These correspond to system-logged things on Mac. We don't currently track
157 // any of these on Windows, but could in the future. 161 // any of these on Windows, but could in the future.
158 // See https://code.google.com/p/crashpad/issues/detail?id=38. 162 // See https://code.google.com/p/crashpad/issues/detail?id=38.
159 return std::vector<std::string>(); 163 return std::vector<std::string>();
160 } 164 }
161 165
162 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap() 166 std::map<std::string, std::string> ModuleSnapshotWin::AnnotationsSimpleMap()
163 const { 167 const {
164 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 168 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
165 PEImageAnnotationsReader annotations_reader( 169 PEImageAnnotationsReader annotations_reader(
166 process_reader_, pe_image_reader_.get(), name_); 170 process_reader_, pe_image_reader_.get(), name_);
167 return annotations_reader.SimpleMap(); 171 return annotations_reader.SimpleMap();
168 } 172 }
169 173
170 } // namespace internal 174 } // namespace internal
171 } // namespace crashpad 175 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/snapshot_test.gyp ('k') | snapshot/win/pe_image_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698