Skip to contentSkip to conversation

scripts/decode_stacktrace: Look for modules with .ko.debug extension

PATCH Superseded Nicolas Boichat 2 participants 3 messages May 21, 2019 – May 28, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/decode_stacktrace: Look for modules with .ko.debug extension

In Chromium OS kernel builds, we split the debug information as .ko.debug files, and that's what decode_stacktrace.sh needs to use.

Relax objfile matching rule to allow any .ko* file to be matched.

---
 scripts/decode_stacktrace.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/decode_stacktrace.sh +1 -1
index bcdd45df3f5127a..c851c1eb16f9cf7 100755
@@ -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
Signature · 1 line
2.21.0.1020.gf2820cf01a-goog
#1 lore raw
Quoted 15 lines · Nicolas Boichat

In Chromium OS kernel builds, we split the debug information as .ko.debug files, and that's what decode_stacktrace.sh needs to use.

Relax objfile matching rule to allow any .ko* file to be matched.

---
  scripts/decode_stacktrace.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
scripts/decode_stacktrace.sh +0 -0
index bcdd45df3f5127a..c851c1eb16f9cf7 100755

scripts/decode_stacktrace.sh parse_symbol() { · line 31

Quoted 5 lines
scripts/decode_stacktrace.sh +1 -1
@@ -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)

Ok but should be quoted "$module.ko*" or escaped $module.ko\*

Quoted 4 lines
scripts/decode_stacktrace.sh +0 -0
  		[[ $objfile == "" ]] && return
  		modcache[$module]=$objfile
  	fi
#2 lore raw
Quoted 12 lines · Konstantin Khlebnikov
Quoted 10 lines · Nicolas Boichat

In Chromium OS kernel builds, we split the debug information as .ko.debug files, and that's what decode_stacktrace.sh needs to use.

Relax objfile matching rule to allow any .ko* file to be matched.

---
  scripts/decode_stacktrace.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

scripts/decode_stacktrace.sh parse_symbol() { · line 31

Quoted 10 lines
scripts/decode_stacktrace.sh +1 -1
index bcdd45df3f5127a..c851c1eb16f9cf7 100755
@@ -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)

Ok but should be quoted "$module.ko*" or escaped $module.ko\*

Thanks for noticing, will send a v2 right away.

Quoted 4 lines
Quoted 4 lines
scripts/decode_stacktrace.sh +0 -0
              [[ $objfile == "" ]] && return
              modcache[$module]=$objfile
      fi