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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 process_reader_module.size, | 53 process_reader_module.size, |
54 base::UTF16ToUTF8(name_))) { | 54 base::UTF16ToUTF8(name_))) { |
55 return false; | 55 return false; |
56 } | 56 } |
57 | 57 |
58 DWORD age_dword; | 58 DWORD age_dword; |
59 if (pe_image_reader_->DebugDirectoryInformation( | 59 if (pe_image_reader_->DebugDirectoryInformation( |
60 &uuid_, &age_dword, &pdb_name_)) { | 60 &uuid_, &age_dword, &pdb_name_)) { |
61 static_assert(sizeof(DWORD) == sizeof(uint32_t), "unexpected age size"); | 61 static_assert(sizeof(DWORD) == sizeof(uint32_t), "unexpected age size"); |
62 age_ = age_dword; | 62 age_ = age_dword; |
63 } else { | |
64 pdb_name_ = base::UTF16ToUTF8(name_); | |
Mark Mentovai
2015/10/30 19:42:44
Add a short comment saying that this isn’t how the
scottmg
2015/10/30 23:52:07
Done.
| |
63 } | 65 } |
64 | 66 |
65 INITIALIZATION_STATE_SET_VALID(initialized_); | 67 INITIALIZATION_STATE_SET_VALID(initialized_); |
66 return true; | 68 return true; |
67 } | 69 } |
68 | 70 |
69 void ModuleSnapshotWin::GetCrashpadOptions(CrashpadInfoClientOptions* options) { | 71 void ModuleSnapshotWin::GetCrashpadOptions(CrashpadInfoClientOptions* options) { |
70 INITIALIZATION_STATE_DCHECK_VALID(initialized_); | 72 INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
71 if (process_reader_->Is64Bit()) | 73 if (process_reader_->Is64Bit()) |
72 GetCrashpadOptionsInternal<process_types::internal::Traits64>(options); | 74 GetCrashpadOptionsInternal<process_types::internal::Traits64>(options); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 CrashpadInfoClientOptions::TriStateFromCrashpadInfo( | 189 CrashpadInfoClientOptions::TriStateFromCrashpadInfo( |
188 crashpad_info.crashpad_handler_behavior); | 190 crashpad_info.crashpad_handler_behavior); |
189 | 191 |
190 options->system_crash_reporter_forwarding = | 192 options->system_crash_reporter_forwarding = |
191 CrashpadInfoClientOptions::TriStateFromCrashpadInfo( | 193 CrashpadInfoClientOptions::TriStateFromCrashpadInfo( |
192 crashpad_info.system_crash_reporter_forwarding); | 194 crashpad_info.system_crash_reporter_forwarding); |
193 } | 195 } |
194 | 196 |
195 } // namespace internal | 197 } // namespace internal |
196 } // namespace crashpad | 198 } // namespace crashpad |
OLD | NEW |