summaryrefslogtreecommitdiff
path: root/scripts/decode_stacktrace.sh
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-07-28 15:35:50 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2020-07-28 15:35:50 +0200
commitf4a1692491b5cce8978cea19cb8946bc2c6f14bc (patch)
tree1865126859b5b9d613c49113a5aaafc78f79b99b /scripts/decode_stacktrace.sh
parent8490d6a7e0a0a6fab5c2d82d57a3937306660864 (diff)
parent0d7869805a82b91abdc1a56bddeaa374969af310 (diff)
downloadlinux-f4a1692491b5cce8978cea19cb8946bc2c6f14bc.tar.gz
linux-f4a1692491b5cce8978cea19cb8946bc2c6f14bc.tar.bz2
linux-f4a1692491b5cce8978cea19cb8946bc2c6f14bc.zip
Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes
Updating drm-misc-fixes to v5.8-rc7.
Diffstat (limited to 'scripts/decode_stacktrace.sh')
-rwxr-xr-xscripts/decode_stacktrace.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 13e5fbafdf2f..0869def435ee 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -27,7 +27,10 @@ parse_symbol() {
elif [[ "${modcache[$module]+isset}" == "isset" ]]; then
local objfile=${modcache[$module]}
else
- [[ $modpath == "" ]] && return
+ if [[ $modpath == "" ]]; then
+ echo "WARNING! Modules path isn't set, but is needed to parse this symbol" >&2
+ return
+ fi
local objfile=$(find "$modpath" -name "${module//_/[-_]}.ko*" -print -quit)
[[ $objfile == "" ]] && return
modcache[$module]=$objfile
@@ -84,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'/' '}