Skip to content

Commit

Permalink
scripts/decode_stacktrace: only strip base path when a prefix of the …
Browse files Browse the repository at this point in the history
…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: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Marc Zyngier <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Marc Zyngier authored and torvalds committed Dec 28, 2018
1 parent c5cfb62 commit 67a28de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/decode_stacktrace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'/' '}
Expand Down

0 comments on commit 67a28de

Please sign in to comment.