LKML Archive on
 help / color / Atom feed
From: Pi-Hsun Shih <>
To: unlisted-recipients:; (no To-header on input)
Cc: Pi-Hsun Shih <>, Shik Chen <>,
	Sasha Levin <>,
	Stephen Boyd <>,
	Andrew Morton <>,
	Nicolas Boichat <>, (open list)
Subject: [PATCH] scripts/decode_stacktrace: Strip basepath from all paths.
Date: Mon, 20 Jul 2020 08:27:07 +0000
Message-ID: <> (raw)

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")
Signed-off-by: Pi-Hsun Shih <>
Co-developed-by: Shik Chen <>
Signed-off-by: Shik Chen <>
 scripts/ | 4 ++--
 1 file 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'/' '}

base-commit: 5714ee50bb4375bd586858ad800b1d9772847452

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  8:27 Pi-Hsun Shih [this message]
2020-07-20 23:01 ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone