History

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.

Evan Green committed 7 years ago

Commit ca90bbd1 parent 85f946f1 file · +1 −1Browse files

Showing the changes to scripts/decode_stacktrace.sh (1 of 1 file). Show all

Unified · Split

scripts/decode_stacktrace.sh+1−1
@@ -28,7 +28,7 @@ parse_symbol() { · 27 unmodified lines
2828 local objfile=${modcache[$module]}
2929 else
3030 [[ $modpath == "" ]] && return
31− local objfile=$(find "$modpath" -name "$module.ko*" -print -quit)
31+ local objfile=$(find "$modpath" -name "${module//_/[-_]}.ko*" -print -quit)
3232 [[ $objfile == "" ]] && return
3333 modcache[$module]=$objfile
3434 fi