[PATCH 0/8] Add GDB memory helper commands
Kuan-Ying Lee
Kuan-Ying.Lee at mediatek.com
Tue Jul 25 02:34:50 PDT 2023
Hi all,
I've created some GDB commands I think useful when I debug
some memory issues and kernel module issue.
For memory issue, we would like to get slabinfo, slabtrace,
page_owner and vmallocinfo to debug the memory issues.
For module issue, we would like to query kernel module name
when we get a module text address and load module
symbol by specific path.
This patchset is based on v6.5-rc3.
Patch 1-2:
- Add kernel module releated command.
Patch 3-5:
- Prepares for the memory-releated command.
Patch 6-8:
- Add memory-related commands.
Kuan-Ying Lee (8):
scripts/gdb/symbols: add specific ko module load command
scripts/gdb/modules: add get module text support
scripts/gdb/utils: add common type usage
scripts/gdb/aarch64: add aarch64 page operation helper commands and
configs
scripts/gdb/stackdepot: Add stackdepot support
scripts/gdb/page_owner: add page owner support
scripts/gdb/slab: Add slab support
scripts/gdb/vmalloc: add vmallocinfo support
scripts/gdb/linux/constants.py.in | 59 +++
scripts/gdb/linux/mm.py | 579 +++++++++++++++++++-----------
scripts/gdb/linux/modules.py | 32 +-
scripts/gdb/linux/page_owner.py | 189 ++++++++++
scripts/gdb/linux/pgtable.py | 222 ++++++++++++
scripts/gdb/linux/slab.py | 322 +++++++++++++++++
scripts/gdb/linux/stackdepot.py | 54 +++
scripts/gdb/linux/symbols.py | 23 +-
scripts/gdb/linux/utils.py | 20 ++
scripts/gdb/linux/vmalloc.py | 56 +++
scripts/gdb/vmlinux-gdb.py | 7 +-
11 files changed, 1356 insertions(+), 207 deletions(-)
create mode 100644 scripts/gdb/linux/page_owner.py
create mode 100644 scripts/gdb/linux/pgtable.py
create mode 100644 scripts/gdb/linux/slab.py
create mode 100644 scripts/gdb/linux/stackdepot.py
create mode 100644 scripts/gdb/linux/vmalloc.py
--
2.18.0
More information about the linux-arm-kernel
mailing list