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

Unified Diff: crash_reporter.cc

Issue 6297004: crash-reporter: Add diagnostics to help diagnose failures in the wild (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git@master
Patch Set: respond to review Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crash_collector_test.cc ('k') | crash_reporter_logs.conf » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_reporter.cc
diff --git a/crash_reporter.cc b/crash_reporter.cc
index 07dcd9c5c647b5120384ff9cac8e4cafd12bc0e9..cc9e30d13c636d1bc45670d5bcc0c394b61fa5fa 100644
--- a/crash_reporter.cc
+++ b/crash_reporter.cc
@@ -21,8 +21,7 @@ DEFINE_bool(clean_shutdown, false, "Signal clean shutdown");
DEFINE_string(generate_kernel_signature, "",
"Generate signature from given kcrash file");
DEFINE_bool(crash_test, false, "Crash test");
-DEFINE_int32(pid, -1, "Crashing PID");
-DEFINE_int32(signal, -1, "Signal causing crash");
+DEFINE_string(user, "", "User crash info (pid:signal:exec_name)");
DEFINE_bool(unclean_check, true, "Check for unclean shutdown");
#pragma GCC diagnostic error "-Wstrict-aliasing"
@@ -131,8 +130,7 @@ static int Initialize(KernelCollector *kernel_collector,
static int HandleUserCrash(UserCollector *user_collector) {
// Handle a specific user space crash.
- CHECK(FLAGS_signal != -1) << "Signal must be set";
- CHECK(FLAGS_pid != -1) << "PID must be set";
+ CHECK(!FLAGS_user.empty()) << "--user= must be set";
// Make it possible to test what happens when we crash while
// handling a crash.
@@ -142,7 +140,7 @@ static int HandleUserCrash(UserCollector *user_collector) {
}
// Handle the crash, get the name of the process from procfs.
- if (!user_collector->HandleCrash(FLAGS_signal, FLAGS_pid, NULL)) {
+ if (!user_collector->HandleCrash(FLAGS_user, NULL)) {
return 1;
}
return 0;
« no previous file with comments | « crash_collector_test.cc ('k') | crash_reporter_logs.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698