path: root/scripts/
diff options
authorMarc Zyngier <>2018-12-28 00:31:25 -0800
committerLinus Torvalds <>2018-12-28 12:11:44 -0800
commit67a28de47faa83585dd644bd4c31e5a1d9346c50 (patch)
tree0ccdb0fb605697cd5627ad17cb18caebd4e013d4 /scripts/
parentc5cfb62f2bdf51c71ab4b8b33271beab34096c71 (diff)
scripts/decode_stacktrace: only strip base path when a prefix of the path
Running something like: decodecode vmlinux . leads to interested results where not only the leading "." gets stripped from the displayed paths, but also anywhere in the string, displaying something like: kvm_vcpu_check_block (arch/arm64/kvm/virt/kvm/kvm_mainc:2141) which doesn't help further processing. Fix it by only stripping the base path if it is a prefix of the path. Link: Signed-off-by: Marc Zyngier <> Cc: Will Deacon <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'scripts/')
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ b/scripts/
index 64220e36ce3b..98a7d63a723e 100755
--- a/scripts/
+++ b/scripts/
@@ -78,7 +78,7 @@ parse_symbol() {
# Strip out the base of the path
- code=${code//$basepath/""}
+ code=${code//^$basepath/""}
# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}