History

scripts: decode_stacktrace: fix ARM architecture decoding

Fix the stack decoder for the ARM architecture. An ARM stack is designed as : [ 81.547704] [<c023eb04>] (bucket_find_contain) from [<c023ec88>] (check_sync+0x40/0x4f8) [ 81.559668] [<c023ec88>] (check_sync) from [<c023f8c4>] (debug_dma_sync_sg_for_cpu+0x128/0x194) [ 81.571583] [<c023f8c4>] (debug_dma_sync_sg_for_cpu) from [<c0327dec>] (__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.

Robert Jarzmik committed 11 years ago

Commit e260fe01 parent fa709001 file · +4 −1Browse files

Showing the changes to scripts/decode_stacktrace.sh (1 of 1 file). Show all

Unified · Split

scripts/decode_stacktrace.sh+4−1
@@ -14,11 +14,14 @@ declare -A cache · 13 unmodified lines
14 14
15parse_symbol() {15parse_symbol() {
16 # The structure of symbol at this point is:16 # The structure of symbol at this point is:
17 # [name]+[offset]/[total length]17 # ([name]+[offset]/[total length])
18 #18 #
19 # For example:19 # For example:
20 # do_basic_setup+0x9c/0xbf20 # do_basic_setup+0x9c/0xbf
21 21
22 # Remove the englobing parenthesis
23 symbol=${symbol#\(}
24 symbol=${symbol%\)}
22 25
23 # Strip the symbol name so that we could look it up26 # Strip the symbol name so that we could look it up
24 local name=${symbol%+*}27 local name=${symbol%+*}