Skip to contentSkip to conversation

scripts/gdb: implement x86_page_ops in mm.py

PATCH Applied Seongjun Hong 1 participant 1 message Feb 2 GDB kernel debugging helper scripts

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scripts/gdb: implement x86_page_ops in mm.py

Implement all member functions of x86_page_ops strictly following the logic of aarch64_page_ops.

This includes full support for SPARSEMEM and standard page translation functions.

This fixes compatibility with 'lx-' commands on x86_64, preventing AttributeErrors when using lx-pfn_to_page and others.

---
Changes in v2:
* Implement full x86_page_ops including SPARSEMEM support to match aarch64.

 scripts/gdb/linux/constants.py.in |   2 +-
 scripts/gdb/linux/mm.py           | 173 +++++++++++++++++++++++++++++-
 2 files changed, 173 insertions(+), 2 deletions(-)
scripts/gdb/linux/constants.py.in +1 -1
index c3886739a028..11fd4ba6ba85 100644
@@ -150,8 +150,8 @@ LX_CONFIG(CONFIG_ARM64_64K_PAGES)
 if IS_BUILTIN(CONFIG_ARM64):
     LX_VALUE(CONFIG_ARM64_PA_BITS)
     LX_VALUE(CONFIG_ARM64_VA_BITS)
-    LX_VALUE(CONFIG_PAGE_SHIFT)
     LX_VALUE(CONFIG_ARCH_FORCE_MAX_ORDER)
+LX_VALUE(CONFIG_PAGE_SHIFT)
 LX_CONFIG(CONFIG_SPARSEMEM)
 LX_CONFIG(CONFIG_SPARSEMEM_EXTREME)
 LX_CONFIG(CONFIG_SPARSEMEM_VMEMMAP)
scripts/gdb/linux/mm.py +172 -1

180 lines not on this page · raw message

Signature · 1 line
2.34.1