diff options
author | Pankaj Raghav <p.raghav@samsung.com> | 2023-04-13 14:00:55 -0700 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-13 14:03:25 -0700 |
commit | b4aff7513df323553de714dcf7b54e896577be1f (patch) | |
tree | eef8656a69e45a7729df537278b652cf8dae09c9 /scripts/gdb/linux/modules.py | |
parent | 560db7ccf96dda75592c6d2a604c1e296104fe7a (diff) |
scripts/gdb: use mem instead of core_layout to get the module address
commit ac3b43283923 ("module: replace module_layout with module_memory")
changed the struct module data structure from module_layout to
module_memory. The core_layout member which is used while loading
modules are not available anymore leading to the following error while
running gdb:
(gdb) lx-symbols
loading vmlinux
Python Exception <class 'gdb.error'>: There is no member named core_layout.
Error occurred in Python: There is no member named core_layout.
Replace core_layout with its new counterpart mem[MOD_TEXT].
Fixes: ac3b43283923 ("module: replace module_layout with module_memory")
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
-rw-r--r-- | scripts/gdb/linux/modules.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py index 441b23239896..261f28640f4c 100644 --- a/scripts/gdb/linux/modules.py +++ b/scripts/gdb/linux/modules.py @@ -13,7 +13,7 @@ import gdb -from linux import cpus, utils, lists +from linux import cpus, utils, lists, constants module_type = utils.CachedType("struct module") @@ -73,7 +73,7 @@ class LxLsmod(gdb.Command): " " if utils.get_long_type().sizeof == 8 else "")) for module in module_list(): - layout = module['core_layout'] + layout = module['mem'][constants.LX_MOD_TEXT] gdb.write("{address} {name:<19} {size:>8} {ref}".format( address=str(layout['base']).split()[0], name=module['name'].string(), |