Skip to contentSkip to conversation

scripts-decode_stacktrace-strip-basepath-from-all-paths.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 24, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: scripts/decode_stacktrace: strip basepath from all paths
has been removed from the -mm tree. Its filename was
scripts-decode_stacktrace-strip-basepath-from-all-paths.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Pi-Hsun Shih <[email protected]>
Subject: 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")
Cc Sasha Levin <[email protected]>
Cc Nicolas Boichat <[email protected]>
Cc Jiri Slaby <[email protected]>

---

 scripts/decode_stacktrace.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/decode_stacktrace.sh renamed from scripts/decode_stacktrace.sh~scripts-decode_stacktrace-strip-basepath-from-all-paths +2 -2
@@ -87,8 +87,8 @@ parse_symbol() {
 		return
 	fi
 
-	# 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'/' '}

_

Patches currently in -mm which might be from [email protected] are