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

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

Issue 1473073008: Build fixes for Clang on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad.git@master
Patch Set: curlies Created 5 years 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 | « no previous file | snapshot/win/process_snapshot_win.cc » ('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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 INITIALIZATION_STATE_SET_VALID(initialized_); 79 INITIALIZATION_STATE_SET_VALID(initialized_);
80 return true; 80 return true;
81 } 81 }
82 82
83 template <class Traits> 83 template <class Traits>
84 bool PEImageReader::GetCrashpadInfo( 84 bool PEImageReader::GetCrashpadInfo(
85 process_types::CrashpadInfo<Traits>* crashpad_info) const { 85 process_types::CrashpadInfo<Traits>* crashpad_info) const {
86 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 86 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
87 87
88 IMAGE_SECTION_HEADER section; 88 IMAGE_SECTION_HEADER section;
89 if (!GetSectionByName<NtHeadersForTraits<Traits>::type>("CPADinfo", &section)) 89 if (!GetSectionByName<typename NtHeadersForTraits<Traits>::type>("CPADinfo",
90 &section)) {
90 return false; 91 return false;
92 }
91 93
92 if (section.Misc.VirtualSize < sizeof(process_types::CrashpadInfo<Traits>)) { 94 if (section.Misc.VirtualSize < sizeof(process_types::CrashpadInfo<Traits>)) {
93 LOG(WARNING) << "small crashpad info section size " 95 LOG(WARNING) << "small crashpad info section size "
94 << section.Misc.VirtualSize << ", " << module_name_; 96 << section.Misc.VirtualSize << ", " << module_name_;
95 return false; 97 return false;
96 } 98 }
97 99
98 WinVMAddress crashpad_info_address = Address() + section.VirtualAddress; 100 WinVMAddress crashpad_info_address = Address() + section.VirtualAddress;
99 CheckedWinAddressRange crashpad_info_range(process_reader_->Is64Bit(), 101 CheckedWinAddressRange crashpad_info_range(process_reader_->Is64Bit(),
100 crashpad_info_address, 102 crashpad_info_address,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // Explicit instantiations with the only 2 valid template arguments to avoid 303 // Explicit instantiations with the only 2 valid template arguments to avoid
302 // putting the body of the function in the header. 304 // putting the body of the function in the header.
303 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits32>( 305 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits32>(
304 process_types::CrashpadInfo<process_types::internal::Traits32>* 306 process_types::CrashpadInfo<process_types::internal::Traits32>*
305 crashpad_info) const; 307 crashpad_info) const;
306 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits64>( 308 template bool PEImageReader::GetCrashpadInfo<process_types::internal::Traits64>(
307 process_types::CrashpadInfo<process_types::internal::Traits64>* 309 process_types::CrashpadInfo<process_types::internal::Traits64>*
308 crashpad_info) const; 310 crashpad_info) const;
309 311
310 } // namespace crashpad 312 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | snapshot/win/process_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698