* [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
@ 2020-07-22 10:22 Stefano Garzarella
2020-07-23 10:25 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Garzarella @ 2020-07-22 10:22 UTC (permalink / raw)
To: linux-kernel; +Cc: Jan Kiszka, Kieran Bingham
Commit ed66f991bb19 ("module: Refactor section attr into bin
attribute") removed the 'name' field from 'struct module_sect_attr'
triggering the following error when invoking lx-symbols:
(gdb) lx-symbols
loading vmlinux
scanning for modules in linux/build
loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko
Python Exception <class 'gdb.error'> There is no member named name.:
Error occurred in Python: There is no member named name.
This patch fixes the issue taking the module name from the 'struct
attribute'.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
scripts/gdb/linux/symbols.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index be984aa29b75..1be9763cf8bb 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -96,7 +96,7 @@ lx-symbols command."""
return ""
attrs = sect_attrs['attrs']
section_name_to_address = {
- attrs[n]['name'].string(): attrs[n]['address']
+ attrs[n]['battr']['attr']['name'].string(): attrs[n]['address']
for n in range(int(sect_attrs['nsections']))}
args = []
for section_name in [".data", ".data..read_mostly", ".rodata", ".bss",
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
2020-07-22 10:22 [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules Stefano Garzarella
@ 2020-07-23 10:25 ` Jan Kiszka
2020-07-23 10:39 ` Kieran Bingham
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2020-07-23 10:25 UTC (permalink / raw)
To: Stefano Garzarella, linux-kernel, Andrew Morton; +Cc: Kieran Bingham
On 22.07.20 12:22, Stefano Garzarella wrote:
> Commit ed66f991bb19 ("module: Refactor section attr into bin
> attribute") removed the 'name' field from 'struct module_sect_attr'
> triggering the following error when invoking lx-symbols:
>
> (gdb) lx-symbols
> loading vmlinux
> scanning for modules in linux/build
> loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko
> Python Exception <class 'gdb.error'> There is no member named name.:
> Error occurred in Python: There is no member named name.
>
> This patch fixes the issue taking the module name from the 'struct
> attribute'.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> scripts/gdb/linux/symbols.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
> index be984aa29b75..1be9763cf8bb 100644
> --- a/scripts/gdb/linux/symbols.py
> +++ b/scripts/gdb/linux/symbols.py
> @@ -96,7 +96,7 @@ lx-symbols command."""
> return ""
> attrs = sect_attrs['attrs']
> section_name_to_address = {
> - attrs[n]['name'].string(): attrs[n]['address']
> + attrs[n]['battr']['attr']['name'].string(): attrs[n]['address']
> for n in range(int(sect_attrs['nsections']))}
> args = []
> for section_name in [".data", ".data..read_mostly", ".rodata", ".bss",
>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
2020-07-23 10:25 ` Jan Kiszka
@ 2020-07-23 10:39 ` Kieran Bingham
0 siblings, 0 replies; 3+ messages in thread
From: Kieran Bingham @ 2020-07-23 10:39 UTC (permalink / raw)
To: Jan Kiszka, Stefano Garzarella, linux-kernel, Andrew Morton
Hi All,
On 23/07/2020 11:25, Jan Kiszka wrote:
> On 22.07.20 12:22, Stefano Garzarella wrote:
>> Commit ed66f991bb19 ("module: Refactor section attr into bin
>> attribute") removed the 'name' field from 'struct module_sect_attr'
>> triggering the following error when invoking lx-symbols:
>>
>> (gdb) lx-symbols
>> loading vmlinux
>> scanning for modules in linux/build
>> loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko
>> Python Exception <class 'gdb.error'> There is no member named name.:
>> Error occurred in Python: There is no member named name.
>>
>> This patch fixes the issue taking the module name from the 'struct
>> attribute'.
>>
It might not be needed if this gets in to v5.8 in time, but perhaps:
Fixes: ed66f991bb19 ("module: Refactor section attr into bin attribute")
>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Otherwise, also looks fine to me.
Reviewed-by: Kieran Bingham <kbingham@kernel.org>
>> ---
>> scripts/gdb/linux/symbols.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
>> index be984aa29b75..1be9763cf8bb 100644
>> --- a/scripts/gdb/linux/symbols.py
>> +++ b/scripts/gdb/linux/symbols.py
>> @@ -96,7 +96,7 @@ lx-symbols command."""
>> return ""
>> attrs = sect_attrs['attrs']
>> section_name_to_address = {
>> - attrs[n]['name'].string(): attrs[n]['address']
>> + attrs[n]['battr']['attr']['name'].string():
>> attrs[n]['address']
>> for n in range(int(sect_attrs['nsections']))}
>> args = []
>> for section_name in [".data", ".data..read_mostly",
>> ".rodata", ".bss",
>>
>
> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Thanks,
> Jan
>
--
--
Kieran
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-23 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 10:22 [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading modules Stefano Garzarella
2020-07-23 10:25 ` Jan Kiszka
2020-07-23 10:39 ` Kieran Bingham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).