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

Side by Side Diff: tools/generate_dump.cc

Issue 1326443007: win: Fix incorrect thread suspend count due to ScopedProcessSuspend (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: assert some threads captured Created 5 years, 3 months 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 | « snapshot/win/system_snapshot_win_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « snapshot/win/system_snapshot_win_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698