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

Unified Diff: src/platform/crash/crash_reporter.cc

Issue 2121012: Simplify libcrash_dumper interface and make window_manager gen crash dumps (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Change crash dumper lib name Created 10 years, 7 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 | « src/platform/crash/crash_dumper.cc ('k') | src/platform/window_manager/SConstruct » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/crash/crash_reporter.cc
diff --git a/src/platform/crash/crash_reporter.cc b/src/platform/crash/crash_reporter.cc
index 3112fd384a6569d0988c2a20007ae49f5320315e..951d3fae3d4ecfc96104f949b1c9cf1d3a19545b 100644
--- a/src/platform/crash/crash_reporter.cc
+++ b/src/platform/crash/crash_reporter.cc
@@ -15,6 +15,7 @@
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
DEFINE_bool(init, false, "Initialize crash logging");
DEFINE_bool(clean_shutdown, false, "Signal clean shutdown");
+DEFINE_bool(crash_test, false, "Crash test");
DEFINE_string(exec, "", "Executable name crashed");
DEFINE_int32(pid, -1, "Crashing PID");
DEFINE_int32(signal, -1, "Signal causing crash");
@@ -113,6 +114,13 @@ int main(int argc, char *argv[]) {
CHECK(FLAGS_pid != -1) << "PID must be set";
CHECK(FLAGS_exec != "") << "Executable name must be set";
+ // Make it possible to test what happens when we crash while
+ // handling a crash.
+ if (FLAGS_crash_test) {
+ *(char *)0 = 0;
+ return 0;
+ }
+
user_collector.HandleCrash(FLAGS_signal, FLAGS_pid, FLAGS_exec);
return 0;
« no previous file with comments | « src/platform/crash/crash_dumper.cc ('k') | src/platform/window_manager/SConstruct » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698