From 7cd3f25b6b80b8476aae5fa2b5c1b848216da6ad Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 14 Oct 2022 17:03:23 -0700 Subject: util: crash_analyzer recognizes div-0 crashes This CL improves the Regexp to parse the crash reports. Now it supports both "HANDLER" and "PROCESS" exception crash reports. BUG=None TEST=./crash_analyzer.py lite -d /tmp/burnet/ -m /tmp/burnet.map Tested with Burnet crashes where most of them are Div-0 BRANCH=None Change-Id: I58da56c29f6ce5b7b90fe9cbf9fe05f3a354ae92 Signed-off-by: ricardoq@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3956391 Reviewed-by: Jeremy Bettis --- util/crash_analyzer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/crash_analyzer.py b/util/crash_analyzer.py index 6b38766049..2e51511461 100755 --- a/util/crash_analyzer.py +++ b/util/crash_analyzer.py @@ -14,13 +14,13 @@ import sys # This Regex has only been tested in Cortex-M0+ crash reporter. # TODO(b/253492108): Add regexp for missing architectures. _REGEX_CORTEX_M0 = ( - r"^Saved.*$\n=== PROCESS EXCEPTION: (.*) ====== xPSR: (.*) ===$\n" + r"^Saved.*$\n=== .* EXCEPTION: (.*) ====== xPSR: (.*) ===$\n" r"r0 :(.*) r1 :(.*) r2 :(.*) r3 :(.*)$\n" r"r4 :(.*) r5 :(.*) r6 :(.*) r7 :(.*)$\n" r"r8 :(.*) r9 :(.*) r10:(.*) r11:(.*)$\n" r"r12:(.*) sp :(.*) lr :(.*) pc :(.*)$\n" r"\n" - r"^cfsr=(.*), shcsr=(.*), hfsr=(.*), dfsr=(.*), ipsr=(.*)$" + r"^.*cfsr=(.*), shcsr=(.*), hfsr=(.*), dfsr=(.*), ipsr=(.*)$" ) _symbols = [] _entries = [] -- cgit v1.2.1