diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-28 15:35:50 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-28 15:35:50 +0200 |
| commit | f4a1692491b5cce8978cea19cb8946bc2c6f14bc (patch) | |
| tree | 1865126859b5b9d613c49113a5aaafc78f79b99b /scripts/decode_stacktrace.sh | |
| parent | 8490d6a7e0a0a6fab5c2d82d57a3937306660864 (diff) | |
| parent | 0d7869805a82b91abdc1a56bddeaa374969af310 (diff) | |
| download | linux-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-x | scripts/decode_stacktrace.sh | 9 |
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'/' '} |
