Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365908

[PATCH] scripts/gdb: Fix loading of modules information

From Daniel Wagner <wagi@monom.org>
Newsgroups linux.kernel
Subject [PATCH] scripts/gdb: Fix loading of modules information
Date 2016-03-29 08:50 +0200
Message-ID <rhVDs-2f5-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Daniel Wagner <daniel.wagner@bmw-carit.de>

The module_core symbols is not available due to

7523e4dc5057 ("module: use a structure to encapsulate layout.")

The base address of the module is now stored inside
struct module_layout.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Rusty Russell <rusty@rustcorp.com.au>
---
 scripts/gdb/linux/modules.py | 3 ++-
 scripts/gdb/linux/symbols.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py
index 25db8cf..cffe078 100644
--- a/scripts/gdb/linux/modules.py
+++ b/scripts/gdb/linux/modules.py
@@ -74,7 +74,8 @@ class LxLsmod(gdb.Command):
 
         for module in module_list():
             gdb.write("{address} {name:<19} {size:>8}  {ref}".format(
-                address=str(module['module_core']).split()[0],
+                module_layout=module['core_layout']
+                addressr=str(module_layout['base'])
                 name=module['name'].string(),
                 size=str(module['core_size']),
                 ref=str(module['refcnt']['counter'])))
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index 627750c..8650ede 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -108,7 +108,8 @@ lx-symbols command."""
 
     def load_module_symbols(self, module):
         module_name = module['name'].string()
-        module_addr = str(module['module_core']).split()[0]
+        module_layout = module['core_layout']
+        module_addr = str(module_layout['base'])
 
         module_file = self._get_module_file(module_name)
         if not module_file and not self.module_files_updated:
-- 
2.5.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] scripts/gdb: Fix loading of modules information Daniel Wagner <wagi@monom.org> - 2016-03-29 08:50 +0200
  [PATCH v2] scripts/gdb: Fix loading of modules information Daniel Wagner <wagi@monom.org> - 2016-03-29 09:00 +0200
  Re: [PATCH] scripts/gdb: Fix loading of modules information Jan Kiszka <jan.kiszka@siemens.com> - 2016-03-29 09:10 +0200
    Re: [PATCH] scripts/gdb: Fix loading of modules information Daniel Wagner <wagi@monom.org> - 2016-03-29 09:20 +0200
      Re: [PATCH] scripts/gdb: Fix loading of modules information Jan Kiszka <jan.kiszka@siemens.com> - 2016-03-29 09:30 +0200
        Re: [PATCH] scripts/gdb: Fix loading of modules information Daniel Wagner <wagi@monom.org> - 2016-03-31 08:20 +0200

csiph-web