| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 #endif // OS_MACOSX | 176 #endif // OS_MACOSX |
| 177 | 177 |
| 178 #if defined(OS_MACOSX) | 178 #if defined(OS_MACOSX) |
| 179 ProcessSnapshotMac process_snapshot; | 179 ProcessSnapshotMac process_snapshot; |
| 180 if (!process_snapshot.Initialize(task)) { | 180 if (!process_snapshot.Initialize(task)) { |
| 181 return EXIT_FAILURE; | 181 return EXIT_FAILURE; |
| 182 } | 182 } |
| 183 #elif defined(OS_WIN) | 183 #elif defined(OS_WIN) |
| 184 ProcessSnapshotWin process_snapshot; | 184 ProcessSnapshotWin process_snapshot; |
| 185 if (!process_snapshot.Initialize(process.get())) { | 185 if (!process_snapshot.Initialize(process.get(), |
| 186 options.suspend |
| 187 ? ProcessSuspensionState::kSuspended |
| 188 : ProcessSuspensionState::kRunning)) { |
| 186 return EXIT_FAILURE; | 189 return EXIT_FAILURE; |
| 187 } | 190 } |
| 188 #endif // OS_MACOSX | 191 #endif // OS_MACOSX |
| 189 | 192 |
| 190 FileWriter file_writer; | 193 FileWriter file_writer; |
| 191 base::FilePath dump_path( | 194 base::FilePath dump_path( |
| 192 ToolSupport::CommandLineArgumentToFilePathStringType( | 195 ToolSupport::CommandLineArgumentToFilePathStringType( |
| 193 options.dump_path)); | 196 options.dump_path)); |
| 194 if (!file_writer.Open(dump_path, | 197 if (!file_writer.Open(dump_path, |
| 195 FileWriteMode::kTruncateOrCreate, | 198 FileWriteMode::kTruncateOrCreate, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 216 | 219 |
| 217 #if defined(OS_POSIX) | 220 #if defined(OS_POSIX) |
| 218 int main(int argc, char* argv[]) { | 221 int main(int argc, char* argv[]) { |
| 219 return crashpad::GenerateDumpMain(argc, argv); | 222 return crashpad::GenerateDumpMain(argc, argv); |
| 220 } | 223 } |
| 221 #elif defined(OS_WIN) | 224 #elif defined(OS_WIN) |
| 222 int wmain(int argc, wchar_t* argv[]) { | 225 int wmain(int argc, wchar_t* argv[]) { |
| 223 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::GenerateDumpMain); | 226 return crashpad::ToolSupport::Wmain(argc, argv, crashpad::GenerateDumpMain); |
| 224 } | 227 } |
| 225 #endif // OS_POSIX | 228 #endif // OS_POSIX |
| OLD | NEW |