scripts/gdb/modules: add get module text support
authorKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Tue, 8 Aug 2023 08:30:12 +0000 (16:30 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:46:22 +0000 (13:46 -0700)
commit82141540c3e01d1929299c81375e97b80b8eaf52
treefe1f74247b724a045bc2a50c7267617df38eff68
parent11f956538c07e566bb8edf399c30cccb064df5a3
scripts/gdb/modules: add get module text support

When we get an text address from coredump and we cannot find
this address in vmlinux, it might located in kernel module.

We want to know which kernel module it located in.

This GDB scripts can help us to find the target kernel module.

(gdb) lx-getmod-by-textaddr 0xffff800002d305ac
0xffff800002d305ac is in kasan_test.ko

Link: https://lkml.kernel.org/r/20230808083020.22254-3-Kuan-Ying.Lee@mediatek.com
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Chinwen Chang <chinwen.chang@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Qun-Wei Lin <qun-wei.lin@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/modules.py