From: Robert Jarzmik Date: Fri, 4 Sep 2015 22:43:26 +0000 (-0700) Subject: scripts: decode_stacktrace: fix ARM architecture decoding X-Git-Tag: v5.15~15140^2~100 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e260fe01fa39eddb05bd8b70fad5bc9a129648f2;p=platform%2Fkernel%2Flinux-starfive.git scripts: decode_stacktrace: fix ARM architecture decoding Fix the stack decoder for the ARM architecture. An ARM stack is designed as : [ 81.547704] [] (bucket_find_contain) from [] (check_sync+0x40/0x4f8) [ 81.559668] [] (check_sync) from [] (debug_dma_sync_sg_for_cpu+0x128/0x194) [ 81.571583] [] (debug_dma_sync_sg_for_cpu) from [] (__videobuf_s The current script doesn't expect the symbols to be bound by parenthesis, and triggers the following errors : awk: cmd. line:1: error: Unmatched ( or \(: / (check_sync$/ [ 81.547704] (bucket_find_contain) from (check_sync+0x40/0x4f8) Fix it by chopping starting and ending parenthesis from the each symbol name. As a side note, this probably comes from the function dump_backtrace_entry(), which is implemented differently for each architecture. That makes a single decoding script a bit a challenge. Signed-off-by: Robert Jarzmik Cc: Sasha Levin Cc: Russell King Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index 515c4c0..00d6d53c 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -14,11 +14,14 @@ declare -A cache parse_symbol() { # The structure of symbol at this point is: - # [name]+[offset]/[total length] + # ([name]+[offset]/[total length]) # # For example: # do_basic_setup+0x9c/0xbf + # Remove the englobing parenthesis + symbol=${symbol#\(} + symbol=${symbol%\)} # Strip the symbol name so that we could look it up local name=${symbol%+*}