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, ×tamp, crashing_function)) { |
+ while (eip_re.FindAndConsume(&kernel_dump, ×tamp, ®, crashing_function)) { |
if (print_diagnostics) { |
printf("@%f: found crashing function %s\n", |
timestamp, |