2019-05-21 23:43:26

by Nicolas Boichat

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Nicolas Boichat <[email protected]>
---
scripts/decode_stacktrace.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index bcdd45df3f5127a..c851c1eb16f9cf7 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
--
2.21.0.1020.gf2820cf01a-goog


2019-05-28 08:40:18

by Konstantin Khlebnikov

[permalink] [raw]
Subject: Re: [PATCH] scripts/decode_stacktrace: Look for modules with .ko.debug extension

On 22.05.2019 2:41, Nicolas Boichat wrote:
> 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.
>
> Signed-off-by: Nicolas Boichat <[email protected]>
> ---
> scripts/decode_stacktrace.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> index bcdd45df3f5127a..c851c1eb16f9cf7 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)

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

> [[ $objfile == "" ]] && return
> modcache[$module]=$objfile
> fi
>

2019-05-28 10:29:52

by Nicolas Boichat

[permalink] [raw]
Subject: Re: [PATCH] scripts/decode_stacktrace: Look for modules with .ko.debug extension

On Tue, May 28, 2019 at 4:38 PM Konstantin Khlebnikov
<[email protected]> wrote:
>
> On 22.05.2019 2:41, Nicolas Boichat wrote:
> > 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.
> >
> > Signed-off-by: Nicolas Boichat <[email protected]>
> > ---
> > scripts/decode_stacktrace.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
> > index bcdd45df3f5127a..c851c1eb16f9cf7 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)
>
> Ok but should be quoted "$module.ko*" or escaped $module.ko\*

Thanks for noticing, will send a v2 right away.

> > [[ $objfile == "" ]] && return
> > modcache[$module]=$objfile
> > fi
> >