Commit a8d96c56 authored by Jan Kiszka's avatar Jan Kiszka Committed by Greg Kroah-Hartman

scripts/gdb: account for changes in module data structure

commit ad4db3b2 upstream.

Commit 7523e4dc ("module: use a structure to encapsulate layout.")
factored out the module_layout structure.  Adjust the symbol loader and
the lsmod command to this.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham@linaro.org>
Tested-by: Kieran Bingham <kieran.bingham@linaro.org> (qemu-{ARM,x86})
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7857985b
...@@ -73,10 +73,11 @@ class LxLsmod(gdb.Command): ...@@ -73,10 +73,11 @@ class LxLsmod(gdb.Command):
" " if utils.get_long_type().sizeof == 8 else "")) " " if utils.get_long_type().sizeof == 8 else ""))
for module in module_list(): for module in module_list():
layout = module['core_layout']
gdb.write("{address} {name:<19} {size:>8} {ref}".format( gdb.write("{address} {name:<19} {size:>8} {ref}".format(
address=str(module['module_core']).split()[0], address=str(layout['base']).split()[0],
name=module['name'].string(), name=module['name'].string(),
size=str(module['core_size']), size=str(layout['size']),
ref=str(module['refcnt']['counter']))) ref=str(module['refcnt']['counter'])))
source_list = module['source_list'] source_list = module['source_list']
......
...@@ -108,7 +108,7 @@ lx-symbols command.""" ...@@ -108,7 +108,7 @@ lx-symbols command."""
def load_module_symbols(self, module): def load_module_symbols(self, module):
module_name = module['name'].string() module_name = module['name'].string()
module_addr = str(module['module_core']).split()[0] module_addr = str(module['core_layout']['base']).split()[0]
module_file = self._get_module_file(module_name) module_file = self._get_module_file(module_name)
if not module_file and not self.module_files_updated: if not module_file and not self.module_files_updated:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment