OLD | NEW |
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return kModuleTypeSharedLibrary; | 143 return kModuleTypeSharedLibrary; |
144 case MH_DYLINKER: | 144 case MH_DYLINKER: |
145 return kModuleTypeDynamicLoader; | 145 return kModuleTypeDynamicLoader; |
146 case MH_BUNDLE: | 146 case MH_BUNDLE: |
147 return kModuleTypeLoadableModule; | 147 return kModuleTypeLoadableModule; |
148 default: | 148 default: |
149 return kModuleTypeUnknown; | 149 return kModuleTypeUnknown; |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 void ModuleSnapshotMac::UUID(crashpad::UUID* uuid) 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 return mach_o_image_reader_->UUID(uuid); | 155 mach_o_image_reader_->UUID(uuid); |
| 156 *age = 0; |
156 } | 157 } |
157 | 158 |
158 std::vector<std::string> ModuleSnapshotMac::AnnotationsVector() const { | 159 std::vector<std::string> ModuleSnapshotMac::AnnotationsVector() const { |
159 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 160 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
160 MachOImageAnnotationsReader annotations_reader( | 161 MachOImageAnnotationsReader annotations_reader( |
161 process_reader_, mach_o_image_reader_, name_); | 162 process_reader_, mach_o_image_reader_, name_); |
162 return annotations_reader.Vector(); | 163 return annotations_reader.Vector(); |
163 } | 164 } |
164 | 165 |
165 std::map<std::string, std::string> ModuleSnapshotMac::AnnotationsSimpleMap() | 166 std::map<std::string, std::string> ModuleSnapshotMac::AnnotationsSimpleMap() |
166 const { | 167 const { |
167 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 168 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
168 MachOImageAnnotationsReader annotations_reader( | 169 MachOImageAnnotationsReader annotations_reader( |
169 process_reader_, mach_o_image_reader_, name_); | 170 process_reader_, mach_o_image_reader_, name_); |
170 return annotations_reader.SimpleMap(); | 171 return annotations_reader.SimpleMap(); |
171 } | 172 } |
172 | 173 |
173 } // namespace internal | 174 } // namespace internal |
174 } // namespace crashpad | 175 } // namespace crashpad |
OLD | NEW |