| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "crash/system_logging.h" | 10 #include "crash-reporter/system_logging.h" |
| 11 #include "crash/user_collector.h" | 11 #include "crash-reporter/user_collector.h" |
| 12 #include "gflags/gflags.h" | 12 #include "gflags/gflags.h" |
| 13 #include "metrics/metrics_library.h" | 13 #include "metrics/metrics_library.h" |
| 14 | 14 |
| 15 #pragma GCC diagnostic ignored "-Wstrict-aliasing" | 15 #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
| 16 DEFINE_bool(init, false, "Initialize crash logging"); | 16 DEFINE_bool(init, false, "Initialize crash logging"); |
| 17 DEFINE_bool(clean_shutdown, false, "Signal clean shutdown"); | 17 DEFINE_bool(clean_shutdown, false, "Signal clean shutdown"); |
| 18 DEFINE_bool(crash_test, false, "Crash test"); | 18 DEFINE_bool(crash_test, false, "Crash test"); |
| 19 DEFINE_string(exec, "", "Executable name crashed"); | 19 DEFINE_string(exec, "", "Executable name crashed"); |
| 20 DEFINE_int32(pid, -1, "Crashing PID"); | 20 DEFINE_int32(pid, -1, "Crashing PID"); |
| 21 DEFINE_int32(signal, -1, "Signal causing crash"); | 21 DEFINE_int32(signal, -1, "Signal causing crash"); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // handling a crash. | 130 // handling a crash. |
| 131 if (FLAGS_crash_test) { | 131 if (FLAGS_crash_test) { |
| 132 *(char *)0 = 0; | 132 *(char *)0 = 0; |
| 133 return 0; | 133 return 0; |
| 134 } | 134 } |
| 135 | 135 |
| 136 user_collector.HandleCrash(FLAGS_signal, FLAGS_pid, FLAGS_exec); | 136 user_collector.HandleCrash(FLAGS_signal, FLAGS_pid, FLAGS_exec); |
| 137 | 137 |
| 138 return 0; | 138 return 0; |
| 139 } | 139 } |
| OLD | NEW |