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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 } else if (cpu_architecture == kMinidumpCPUArchitectureAMD64) { | 148 } else if (cpu_architecture == kMinidumpCPUArchitectureAMD64) { |
149 SetCPUOtherFeatures(AMD64FeaturesFromSystemSnapshot(system_snapshot), 0); | 149 SetCPUOtherFeatures(AMD64FeaturesFromSystemSnapshot(system_snapshot), 0); |
150 } | 150 } |
151 | 151 |
152 MinidumpOS operating_system; | 152 MinidumpOS operating_system; |
153 switch (system_snapshot->GetOperatingSystem()) { | 153 switch (system_snapshot->GetOperatingSystem()) { |
154 case SystemSnapshot::kOperatingSystemMacOSX: | 154 case SystemSnapshot::kOperatingSystemMacOSX: |
155 operating_system = kMinidumpOSMacOSX; | 155 operating_system = kMinidumpOSMacOSX; |
156 break; | 156 break; |
| 157 case SystemSnapshot::kOperatingSystemWindows: |
| 158 operating_system = kMinidumpOSWin32NT; |
| 159 break; |
157 default: | 160 default: |
158 NOTREACHED(); | 161 NOTREACHED(); |
159 operating_system = kMinidumpOSUnknown; | 162 operating_system = kMinidumpOSUnknown; |
160 break; | 163 break; |
161 } | 164 } |
162 SetOS(operating_system); | 165 SetOS(operating_system); |
163 | 166 |
164 SetOSType(system_snapshot->OSServer() ? kMinidumpOSTypeServer | 167 SetOSType(system_snapshot->OSServer() ? kMinidumpOSTypeServer |
165 : kMinidumpOSTypeWorkstation); | 168 : kMinidumpOSTypeWorkstation); |
166 | 169 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 DCHECK_EQ(state(), kStateWritable); | 290 DCHECK_EQ(state(), kStateWritable); |
288 | 291 |
289 return file_writer->Write(&system_info_, sizeof(system_info_)); | 292 return file_writer->Write(&system_info_, sizeof(system_info_)); |
290 } | 293 } |
291 | 294 |
292 MinidumpStreamType MinidumpSystemInfoWriter::StreamType() const { | 295 MinidumpStreamType MinidumpSystemInfoWriter::StreamType() const { |
293 return kMinidumpStreamTypeSystemInfo; | 296 return kMinidumpStreamTypeSystemInfo; |
294 } | 297 } |
295 | 298 |
296 } // namespace crashpad | 299 } // namespace crashpad |
OLD | NEW |