From b4aff7513df323553de714dcf7b54e896577be1f Mon Sep 17 00:00:00 2001
From: Pankaj Raghav
Date: Thu, 13 Apr 2023 14:00:55 -0700
Subject: 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 : 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
Signed-off-by: Luis Chamberlain
---
scripts/gdb/linux/constants.py.in | 3 +++
1 file changed, 3 insertions(+)
(limited to 'scripts/gdb/linux/constants.py.in')
diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
index 2efbec6b6b8d..8085d3693a05 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -54,6 +54,9 @@ LX_VALUE(SB_NODIRATIME)
/* linux/htimer.h */
LX_GDBPARSED(hrtimer_resolution)
+/* linux/module.h */
+LX_GDBPARSED(MOD_TEXT)
+
/* linux/mount.h */
LX_VALUE(MNT_NOSUID)
LX_VALUE(MNT_NODEV)
--
cgit