crash-reporter: always write kernel crashes for dev builds

Added check for devloper build. Always write kernel crash files when
running devloper builds.

BUG=None
TEST=run "echo bug > /proc/breakme" and ensure the kcrash files get
created under /var/spool/crash

Change-Id: Iced35df9db1f997c41138f082ee50a3506a88eb2
Reviewed-on: https://gerrit.chromium.org/gerrit/10615
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
This commit is contained in:
Ken Mixter 2011-10-25 02:15:05 +00:00 committed by Sameer Nanda
parent ce9556e1c4
commit 9ee1f5f034

View file

@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@ -448,11 +448,18 @@ bool KernelCollector::Collect() {
signature = kDefaultKernelStackSignature;
}
bool feedback = is_feedback_allowed_function_();
std::string reason = "handling";
bool feedback = true;
if (IsDeveloperImage()) {
reason = "developer build - always dumping";
feedback = true;
} else if (!is_feedback_allowed_function_()) {
reason = "ignoring - no consent";
feedback = false;
}
LOG(INFO) << "Received prior crash notification from "
<< "kernel (signature " << signature << ") ("
<< (feedback ? "handling" : "ignoring - no consent") << ")";
<< "kernel (signature " << signature << ") (" << reason << ")";
if (feedback) {
count_crash_function_();