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

Side by Side Diff: snapshot/mac/module_snapshot_mac.cc

Issue 1415543003: win: Plumb module PDB name through snapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return kModuleTypeUnknown; 149 return kModuleTypeUnknown;
150 } 150 }
151 } 151 }
152 152
153 void ModuleSnapshotMac::UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const { 153 void ModuleSnapshotMac::UUIDAndAge(crashpad::UUID* uuid, uint32_t* age) const {
154 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 154 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
155 mach_o_image_reader_->UUID(uuid); 155 mach_o_image_reader_->UUID(uuid);
156 *age = 0; 156 *age = 0;
157 } 157 }
158 158
159 void ModuleSnapshotMac::PDBName() const {
160 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
161 std::string name = Name();
Mark Mentovai 2015/10/28 20:01:10 Now that we’re in platform-specific code where we
scottmg 2015/10/28 20:59:24 Done.
162 size_t last_slash = name.find_last_of('/');
163 if (last_slash != std::string::npos)
164 return name.substr(last_slash + 1);
165 return name;
166 }
167
159 std::vector<std::string> ModuleSnapshotMac::AnnotationsVector() const { 168 std::vector<std::string> ModuleSnapshotMac::AnnotationsVector() const {
160 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 169 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
161 MachOImageAnnotationsReader annotations_reader( 170 MachOImageAnnotationsReader annotations_reader(
162 process_reader_, mach_o_image_reader_, name_); 171 process_reader_, mach_o_image_reader_, name_);
163 return annotations_reader.Vector(); 172 return annotations_reader.Vector();
164 } 173 }
165 174
166 std::map<std::string, std::string> ModuleSnapshotMac::AnnotationsSimpleMap() 175 std::map<std::string, std::string> ModuleSnapshotMac::AnnotationsSimpleMap()
167 const { 176 const {
168 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 177 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
169 MachOImageAnnotationsReader annotations_reader( 178 MachOImageAnnotationsReader annotations_reader(
170 process_reader_, mach_o_image_reader_, name_); 179 process_reader_, mach_o_image_reader_, name_);
171 return annotations_reader.SimpleMap(); 180 return annotations_reader.SimpleMap();
172 } 181 }
173 182
174 } // namespace internal 183 } // namespace internal
175 } // namespace crashpad 184 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698