Index: crash_reporter.cc |
diff --git a/crash_reporter.cc b/crash_reporter.cc |
index ffe6cdfed17e999ff005fb0efd1b8795af88f418..ab4c5ba3bfe6a8bd590346260ba0c401021743ea 100644 |
--- a/crash_reporter.cc |
+++ b/crash_reporter.cc |
@@ -148,10 +148,13 @@ static int HandleUserCrash(UserCollector *user_collector) { |
return 0; |
} |
+ // Accumulate logs to help in diagnosing failures during user collection. |
+ s_system_log.set_accumulating(true); |
// Handle the crash, get the name of the process from procfs. |
- if (!user_collector->HandleCrash(FLAGS_user, NULL)) { |
+ bool handled = user_collector->HandleCrash(FLAGS_user, NULL); |
+ s_system_log.set_accumulating(false); |
+ if (!handled) |
return 1; |
- } |
return 0; |
} |