| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 struct MinidumpThreadListTraits { | 155 struct MinidumpThreadListTraits { |
| 156 typedef MINIDUMP_THREAD_LIST ListType; | 156 typedef MINIDUMP_THREAD_LIST ListType; |
| 157 static constexpr size_t kElementSize = sizeof(MINIDUMP_THREAD); | 157 static constexpr size_t kElementSize = sizeof(MINIDUMP_THREAD); |
| 158 static size_t ElementCount(const ListType* list) { | 158 static size_t ElementCount(const ListType* list) { |
| 159 return list->NumberOfThreads; | 159 return list->NumberOfThreads; |
| 160 } | 160 } |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 struct MinidumpModuleCrashpadInfoListTraits { | 163 struct MinidumpLocationDescriptorListTraits { |
| 164 typedef MinidumpModuleCrashpadInfoList ListType; | 164 typedef MinidumpLocationDescriptorList ListType; |
| 165 static constexpr size_t kElementSize = sizeof(MINIDUMP_LOCATION_DESCRIPTOR); | 165 static constexpr size_t kElementSize = sizeof(MINIDUMP_LOCATION_DESCRIPTOR); |
| 166 static size_t ElementCount(const ListType* list) { | 166 static size_t ElementCount(const ListType* list) { |
| 167 return list->count; | 167 return list->count; |
| 168 } | 168 } |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 struct MinidumpSimpleStringDictionaryListTraits { | 171 struct MinidumpSimpleStringDictionaryListTraits { |
| 172 typedef MinidumpSimpleStringDictionary ListType; | 172 typedef MinidumpSimpleStringDictionary ListType; |
| 173 static constexpr size_t kElementSize = | 173 static constexpr size_t kElementSize = |
| 174 sizeof(MinidumpSimpleStringDictionaryEntry); | 174 sizeof(MinidumpSimpleStringDictionaryEntry); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 template <> | 219 template <> |
| 220 const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor< | 220 const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor< |
| 221 MINIDUMP_THREAD_LIST>(const std::string& file_contents, | 221 MINIDUMP_THREAD_LIST>(const std::string& file_contents, |
| 222 const MINIDUMP_LOCATION_DESCRIPTOR& location) { | 222 const MINIDUMP_LOCATION_DESCRIPTOR& location) { |
| 223 return MinidumpListAtLocationDescriptor<MinidumpThreadListTraits>( | 223 return MinidumpListAtLocationDescriptor<MinidumpThreadListTraits>( |
| 224 file_contents, location); | 224 file_contents, location); |
| 225 } | 225 } |
| 226 | 226 |
| 227 template <> | 227 template <> |
| 228 const MinidumpModuleCrashpadInfoList* | 228 const MinidumpLocationDescriptorList* |
| 229 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>( | 229 MinidumpWritableAtLocationDescriptor<MinidumpLocationDescriptorList>( |
| 230 const std::string& file_contents, | 230 const std::string& file_contents, |
| 231 const MINIDUMP_LOCATION_DESCRIPTOR& location) { | 231 const MINIDUMP_LOCATION_DESCRIPTOR& location) { |
| 232 return MinidumpListAtLocationDescriptor<MinidumpModuleCrashpadInfoListTraits>( | 232 return MinidumpListAtLocationDescriptor<MinidumpLocationDescriptorListTraits>( |
| 233 file_contents, location); | 233 file_contents, location); |
| 234 } | 234 } |
| 235 | 235 |
| 236 template <> | 236 template <> |
| 237 const MinidumpSimpleStringDictionary* | 237 const MinidumpSimpleStringDictionary* |
| 238 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 238 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
| 239 const std::string& file_contents, | 239 const std::string& file_contents, |
| 240 const MINIDUMP_LOCATION_DESCRIPTOR& location) { | 240 const MINIDUMP_LOCATION_DESCRIPTOR& location) { |
| 241 return MinidumpListAtLocationDescriptor< | 241 return MinidumpListAtLocationDescriptor< |
| 242 MinidumpSimpleStringDictionaryListTraits>(file_contents, location); | 242 MinidumpSimpleStringDictionaryListTraits>(file_contents, location); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 const MinidumpModuleCodeViewRecordPDB70* | 283 const MinidumpModuleCodeViewRecordPDB70* |
| 284 MinidumpWritableAtLocationDescriptor<MinidumpModuleCodeViewRecordPDB70>( | 284 MinidumpWritableAtLocationDescriptor<MinidumpModuleCodeViewRecordPDB70>( |
| 285 const std::string& file_contents, | 285 const std::string& file_contents, |
| 286 const MINIDUMP_LOCATION_DESCRIPTOR& location) { | 286 const MINIDUMP_LOCATION_DESCRIPTOR& location) { |
| 287 return MinidumpCVPDBAtLocationDescriptor<MinidumpModuleCodeViewRecordPDB70>( | 287 return MinidumpCVPDBAtLocationDescriptor<MinidumpModuleCodeViewRecordPDB70>( |
| 288 file_contents, location); | 288 file_contents, location); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace test | 291 } // namespace test |
| 292 } // namespace crashpad | 292 } // namespace crashpad |
| OLD | NEW |