Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/decode_stacktrace.sh: better support to ARM32 module stack trace

Sometimes there are special characters around module names in stack
traces, such as ARM32 with BACKTRACE_VERBOSE in "(%pS)" format, such as:
[<806e4845>] (dump_stack_lvl) from [<7f806013>] (hello_init+0x13/0x1000
[test])

In this case, $module will be "[test])", the trace can be decoded by
stripping the right parenthesis first: (dump_stack_lvl) from hello_init
(/foo/test.c:10) test.

Link: https://lkml.kernel.org/r/20240524042600.14738-3-xndchn@gmail.com
Signed-off-by: Xiong Nandi <xndchn@gmail.com>
Suggested-by: Elliot Berman <quic_eberman@quicinc.com>
Cc: Bjorn Andersson <quic_bjorande@quicinc.com>
Cc: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Xiong Nandi and committed by
Andrew Morton
78efbfb5 b41838fe

+3
+3
scripts/decode_stacktrace.sh
··· 283 283 284 284 if [[ ${words[$last]} =~ \[([^]]+)\] ]]; then 285 285 module=${words[$last]} 286 + # some traces format is "(%pS)", which like "(foo+0x0/0x1 [bar])" 287 + # so $module may like "[bar])". Strip the right parenthesis firstly 288 + module=${module%\)} 286 289 module=${module#\[} 287 290 module=${module%\]} 288 291 modbuildid=${module#* }