]> Git Repo - linux.git/commitdiff
scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
authorStefano Garzarella <[email protected]>
Fri, 24 Jul 2020 04:15:52 +0000 (21:15 -0700)
committerLinus Torvalds <[email protected]>
Fri, 24 Jul 2020 19:42:42 +0000 (12:42 -0700)
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'.

Fixes: ed66f991bb19 ("module: Refactor section attr into bin attribute")
Signed-off-by: Stefano Garzarella <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Jan Kiszka <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
scripts/gdb/linux/symbols.py

index be984aa29b759cb1e42bb2c8d6e42eb4b061fb9c..1be9763cf8bb224ee3b754ef2db9250e97cb19eb 100644 (file)
@@ -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",
This page took 0.064266 seconds and 4 git commands to generate.