Chromium Code Reviews| 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, |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 | 195 |
| 196 PEImageResourceReader resource_reader; | 196 PEImageResourceReader resource_reader; |
| 197 if (!resource_reader.Initialize(module_subrange_reader_, data_directory)) { | 197 if (!resource_reader.Initialize(module_subrange_reader_, data_directory)) { |
| 198 return false; | 198 return false; |
| 199 } | 199 } |
| 200 | 200 |
| 201 WinVMAddress address; | 201 WinVMAddress address; |
| 202 WinVMSize size; | 202 WinVMSize size; |
| 203 const uint16_t vs_file_info_type = | |
| 204 static_cast<uint16_t>(reinterpret_cast<uintptr_t>(VS_FILE_INFO)); | |
|
Mark Mentovai
2015/12/15 00:58:56
RT_VERSION belongs with this, since it’s the same
| |
| 203 if (!resource_reader.FindResourceByID( | 205 if (!resource_reader.FindResourceByID( |
| 204 reinterpret_cast<uint16_t>(VS_FILE_INFO), // RT_VERSION | 206 vs_file_info_type, // RT_VERSION |
| 205 VS_VERSION_INFO, | 207 VS_VERSION_INFO, |
| 206 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), | 208 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), |
| 207 &address, | 209 &address, |
| 208 &size, | 210 &size, |
| 209 nullptr)) { | 211 nullptr)) { |
| 210 return false; | 212 return false; |
| 211 } | 213 } |
| 212 | 214 |
| 213 // This structure is not declared anywhere in the SDK, but is documented at | 215 // This structure is not declared anywhere in the SDK, but is documented at |
| 214 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms647001.aspx. | 216 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms647001.aspx. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 // Explicit instantiations with the only 2 valid template arguments to avoid | 378 // Explicit instantiations with the only 2 valid template arguments to avoid |
| 377 // putting the body of the function in the header. | 379 // putting the body of the function in the header. |
| 378 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits32>( | 380 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits32>( |
| 379 process_types::CrashpadInfo<process_types::internal::Traits32>* | 381 process_types::CrashpadInfo<process_types::internal::Traits32>* |
| 380 crashpad_info) const; | 382 crashpad_info) const; |
| 381 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits64>( | 383 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits64>( |
| 382 process_types::CrashpadInfo<process_types::internal::Traits64>* | 384 process_types::CrashpadInfo<process_types::internal::Traits64>* |
| 383 crashpad_info) const; | 385 crashpad_info) const; |
| 384 | 386 |
| 385 } // namespace crashpad | 387 } // namespace crashpad |
| OLD | NEW |