summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2020-07-23 21:15:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 10:18:35 +0200
commit9ab9cfcc2d8f4ef69a88bc648aebea4c4fd4a012 (patch)
tree44323ca81938e8df7d5544198d972e13081e5613 /scripts
parent22508bc315eb183dc3d479463e267174b8efaa8c (diff)
downloadlinux-stable-9ab9cfcc2d8f4ef69a88bc648aebea4c4fd4a012.tar.gz
linux-stable-9ab9cfcc2d8f4ef69a88bc648aebea4c4fd4a012.tar.bz2
linux-stable-9ab9cfcc2d8f4ef69a88bc648aebea4c4fd4a012.zip
scripts/gdb: fix lx-symbols 'gdb.error' while loading modules
[ Upstream commit 7359608a271ce81803de148befefd309baf88c76 ] 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 <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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gdb/linux/symbols.py2
1 files changed, 1 insertions, 1 deletions
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",