linux-kernel-test/scripts/gdb/linux
Ilya Leoshkevich 585d730d41 scripts/gdb: fix debugging modules on s390
Currently lx-symbols assumes that module text is always located at
module->core_layout->base, but s390 uses the following layout:

  +------+  <- module->core_layout->base
  | GOT  |
  +------+  <- module->core_layout->base + module->arch->plt_offset
  | PLT  |
  +------+  <- module->core_layout->base + module->arch->plt_offset +
  | TEXT |     module->arch->plt_size
  +------+

Therefore, when trying to debug modules on s390, all the symbol
addresses are skewed by plt_offset + plt_size.

Fix by adding plt_offset + plt_size to module_addr in
load_module_symbols().

Link: http://lkml.kernel.org/r/20191017085917.81791-1-iii@linux.ibm.com
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-10-19 06:32:33 -04:00
..
__init__.py
.gitignore
clk.py scripts/gdb: print cached rate in lx-clk-summary 2019-05-14 19:52:52 -07:00
config.py scripts/gdb: add kernel config dumping command 2019-05-14 19:52:51 -07:00
constants.py.in scripts/gdb: fix invocation when CONFIG_COMMON_CLK is not set 2019-06-01 15:51:31 -07:00
cpus.py scripts/gdb: silence pep8 checks 2019-05-14 19:52:52 -07:00
device.py scripts/gdb: add helpers to find and list devices 2019-07-16 19:23:24 -07:00
dmesg.py scripts/gdb: fix lx-dmesg when CONFIG_PRINTK_CALLER is set 2019-10-19 06:32:31 -04:00
genpd.py scripts/gdb: add lx-genpd-summary command 2019-07-16 19:23:24 -07:00
lists.py scripts/gdb: clean up error handling in list helpers 2019-05-14 19:52:52 -07:00
Makefile kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree 2019-07-11 00:05:09 +09:00
modules.py
proc.py scripts/gdb: silence pep8 checks 2019-05-14 19:52:52 -07:00
rbtree.py scripts/gdb: add rb tree iterating utilities 2019-05-14 19:52:51 -07:00
symbols.py scripts/gdb: fix debugging modules on s390 2019-10-19 06:32:33 -04:00
tasks.py scripts/gdb: silence pep8 checks 2019-05-14 19:52:52 -07:00
timerlist.py scripts/gdb: add a timer list command 2019-05-14 19:52:52 -07:00
utils.py scripts/gdb: fix lx-dmesg when CONFIG_PRINTK_CALLER is set 2019-10-19 06:32:31 -04:00