path: root/scripts/
diff options
authorPi-Hsun Shih <>2020-07-23 21:15:43 -0700
committerLinus Torvalds <>2020-07-24 12:42:42 -0700
commitd178770d8d21489abf5bafefcbb6d5243b482e9a (patch)
treef3d08e05d896357f4a9ea4022c0a5a1bcc444988 /scripts/
parent2910c59fd0423f87aca3a669b156a2325da63745 (diff)
scripts/decode_stacktrace: strip basepath from all paths
Currently the basepath is removed only from the beginning of the string. When the symbol is inlined and there's multiple line outputs of addr2line, only the first line would have basepath removed. Change to remove the basepath prefix from all lines. Fixes: 31013836a71e ("scripts/decode_stacktrace: match basepath using shell prefix operator, not regex") Co-developed-by: Shik Chen <> Signed-off-by: Pi-Hsun Shih <> Signed-off-by: Shik Chen <> Signed-off-by: Andrew Morton <> Reviewed-by: Stephen Boyd <> Cc: Sasha Levin <> Cc: Nicolas Boichat <> Cc: Jiri Slaby <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'scripts/')
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/ b/scripts/
index 66a6d511b524..0869def435ee 100755
--- a/scripts/
+++ b/scripts/
@@ -87,8 +87,8 @@ parse_symbol() {
- # Strip out the base of the path
- code=${code#$basepath/}
+ # Strip out the base of the path on each line
+ code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code")
# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}