summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-12-28 00:31:25 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-12 19:46:08 +0100
commit6c16674b6bae46fb371bf5bb4243f02c3b14a53f (patch)
tree2866b939c3b63d3f0315613621de0ea3b61e0191 /scripts
parent4c317b2ffd74fb510f1009003ecd97ebd60cfdcd (diff)
downloadlinux-stable-6c16674b6bae46fb371bf5bb4243f02c3b14a53f.tar.gz
linux-stable-6c16674b6bae46fb371bf5bb4243f02c3b14a53f.tar.bz2
linux-stable-6c16674b6bae46fb371bf5bb4243f02c3b14a53f.zip
scripts/decode_stacktrace: only strip base path when a prefix of the path
[ Upstream commit 67a28de47faa83585dd644bd4c31e5a1d9346c50 ] 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: http://lkml.kernel.org/r/20181210174659.31054-3-marc.zyngier@arm.com Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decode_stacktrace.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 64220e36ce3b..98a7d63a723e 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -78,7 +78,7 @@ parse_symbol() {
fi
# 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'/' '}