Skip to content

Commit 7359608

Browse files
stefano-garzarellatorvalds
authored andcommitted
scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
Commit ed66f99 ("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'. Fixes: ed66f99 ("module: Refactor section attr into bin attribute") Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Kieran Bingham <kbingham@kernel.org> Link: http://lkml.kernel.org/r/20200722102239.313231-1-sgarzare@redhat.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bb97153 commit 7359608

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/gdb/linux/symbols.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _section_arguments(self, module):
9696
return ""
9797
attrs = sect_attrs['attrs']
9898
section_name_to_address = {
99-
attrs[n]['name'].string(): attrs[n]['address']
99+
attrs[n]['battr']['attr']['name'].string(): attrs[n]['address']
100100
for n in range(int(sect_attrs['nsections']))}
101101
args = []
102102
for section_name in [".data", ".data..read_mostly", ".rodata", ".bss",

0 commit comments

Comments
 (0)