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

Unified Diff: kernel_collector.cc

Issue 6599022: Add ARM support (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crash-reporter.git@master
Patch Set: Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: kernel_collector.cc
diff --git a/kernel_collector.cc b/kernel_collector.cc
index 4fa51e26e7d2752e494defbca0f5e870323af38d..ad9fc3da1eaaa92041ff5ea14678154837ea35e5 100644
--- a/kernel_collector.cc
+++ b/kernel_collector.cc
@@ -92,11 +92,19 @@ void KernelCollector::ProcessStackTrace(
unsigned *hash,
float *last_stack_timestamp) {
pcrecpp::RE line_re("(.+)", pcrecpp::MULTILINE());
- pcrecpp::RE stack_trace_start_re(kTimestampRegex + " Call Trace:$");
+ pcrecpp::RE stack_trace_start_re(kTimestampRegex +
+ " (Call Trace|Backtrace):$");
// Match lines such as the following and grab out "error_code".
- // <4>[ 6066.849504] [<7937bcee>] error_code+0x66/0x6c
+ // <4>[ 6066.849504] [<7937bcee>] ? error_code+0x66/0x6c
+ // The ? may or may not be present
+
+ // For ARM:
+ // <4>[ 3498.731164] [<c0057220>] (__bug+0x20/0x2c) from [<c018062c>]
+ // (write_breakme+0xdc/0x1bc)
pcrecpp::RE stack_entry_re(kTimestampRegex +
- " \\[<.*>\\]([\\s\\?]+)([^\\+ ]+)");
+ "\\s+\\[<[[:xdigit:]]+>\\]" // Matches " [<7937bcee>]"
kmixter1 2011/03/07 23:16:58 This went from hard to understand to really opaque
sjg 2011/03/15 19:39:35 My schange here were: a. to allow 1 or 2 spaces a
kmixter1 2011/03/17 16:53:30 Yeah, I didn't closely enough - it was already opa
+ "([\\s\\?(]+)" // Matches " ? ("
+ "([^\\+ )]+)"); // Matches until \ + space )
std::string line;
std::string hashable;
@@ -144,10 +152,11 @@ bool KernelCollector::FindCrashingFunction(
bool print_diagnostics,
float stack_trace_timestamp,
std::string *crashing_function) {
- pcrecpp::RE eip_re(kTimestampRegex + " EIP: \\[<.*>\\] ([^\\+ ]+).*",
+ std::string reg;
+ pcrecpp::RE eip_re(kTimestampRegex + " (EIP: \\[<.*>\\]|PC is at) ([^\\+ ]+).*",
kmixter1 2011/03/07 23:16:58 Same comment here.
sjg 2011/03/15 19:39:35 I think this is fair enough, and the kernel will n
kmixter1 2011/03/17 16:53:30 You can't rely on libcros/Chrome since it's not ne
pcrecpp::MULTILINE());
float timestamp = 0;
- while (eip_re.FindAndConsume(&kernel_dump, &timestamp, crashing_function)) {
+ while (eip_re.FindAndConsume(&kernel_dump, &timestamp, &reg, crashing_function)) {
if (print_diagnostics) {
printf("@%f: found crashing function %s\n",
timestamp,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698