summaryrefslogtreecommitdiffstats
path: root/scripts/decode_stacktrace.sh
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-07-11 20:52:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-12 11:05:41 -0700
commitca90bbd410a1dc4b607210a5483786726043e9ec (patch)
treec0ac1a1bdec81fc4f0b5c64fce0df8e4ed5e14c1 /scripts/decode_stacktrace.sh
parent85f946ffd3b61ffccefd41a52f267437d878dd3e (diff)
downloadlinux-ca90bbd410a1dc4b607210a5483786726043e9ec.tar.gz
linux-ca90bbd410a1dc4b607210a5483786726043e9ec.tar.bz2
linux-ca90bbd410a1dc4b607210a5483786726043e9ec.zip
scripts/decode_stacktrace: Accept dash/underscore in modules
The manpage for modprobe mentions that dashes and underscores are treated interchangeably in module names. The stack trace dumps seem to print module names with underscores. Use bash to replace _ with the pattern [-_] so that file names with dashes or underscores can be found. For example, this line: [ 27.919759] hda_widget_sysfs_init+0x2b8/0x3a5 [snd_hda_core] should find a module named snd-hda-core.ko. Link: http://lkml.kernel.org/r/20190531205926.42474-1-evgreen@chromium.org Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Douglas Anderson <dianders@chromium.org> Cc: Evan Green <evgreen@chromium.org> Cc: Nicolas Boichat <drinkcat@chromium.org> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Manuel Traut <manut@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/decode_stacktrace.sh')
-rwxr-xr-xscripts/decode_stacktrace.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index fa704f17275e..13e5fbafdf2f 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -28,7 +28,7 @@ parse_symbol() {
local objfile=${modcache[$module]}
else
[[ $modpath == "" ]] && return
- local objfile=$(find "$modpath" -name "$module.ko*" -print -quit)
+ local objfile=$(find "$modpath" -name "${module//_/[-_]}.ko*" -print -quit)
[[ $objfile == "" ]] && return
modcache[$module]=$objfile
fi