2015-02-17 21:46:36 +00:00
|
|
|
#
|
|
|
|
# gdb helper commands and functions for Linux kernel debugging
|
|
|
|
#
|
|
|
|
# loader module
|
|
|
|
#
|
|
|
|
# Copyright (c) Siemens AG, 2012, 2013
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Jan Kiszka <jan.kiszka@siemens.com>
|
|
|
|
#
|
|
|
|
# This work is licensed under the terms of the GNU GPL version 2.
|
|
|
|
#
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
sys.path.insert(0, os.path.dirname(__file__) + "/scripts/gdb")
|
|
|
|
|
|
|
|
try:
|
|
|
|
gdb.parse_and_eval("0")
|
|
|
|
gdb.execute("", to_string=True)
|
|
|
|
except:
|
|
|
|
gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
|
|
|
|
"work.\n")
|
2015-02-17 21:46:41 +00:00
|
|
|
else:
|
|
|
|
import linux.utils
|
2015-02-17 21:46:47 +00:00
|
|
|
import linux.symbols
|
2015-02-17 21:46:55 +00:00
|
|
|
import linux.modules
|
2015-02-17 21:47:04 +00:00
|
|
|
import linux.dmesg
|
2015-02-17 21:47:10 +00:00
|
|
|
import linux.tasks
|
2019-05-14 22:45:53 +00:00
|
|
|
import linux.config
|
2015-02-17 21:47:21 +00:00
|
|
|
import linux.cpus
|
2015-06-30 21:58:07 +00:00
|
|
|
import linux.lists
|
2019-05-14 22:45:56 +00:00
|
|
|
import linux.rbtree
|
2016-03-22 21:27:33 +00:00
|
|
|
import linux.proc
|
2016-05-23 23:24:40 +00:00
|
|
|
import linux.constants
|
2019-05-14 22:45:59 +00:00
|
|
|
import linux.timerlist
|
2019-05-14 22:46:08 +00:00
|
|
|
import linux.clk
|
2019-07-16 23:30:12 +00:00
|
|
|
import linux.genpd
|
2019-07-16 23:30:15 +00:00
|
|
|
import linux.device
|
scripts/gdb/aarch64: add aarch64 page operation helper commands and configs
JIRA: https://issues.redhat.com/browse/RHEL-40604
Conflicts:
scripts/gdb/linux/constants.py.in
Out of order backport of commit 8ac647d96aac "x86: replace
CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM)"
scripts/gdb/vmlinux-gdb.py
No backports for vfs, radixtree, and interrupts helpers
commit eb985b5dbf9791136700c555fbf964b6c07481ce
Author: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Date: Tue, 8 Aug 2023 16:30:14 +0800
1. Move page table debugging from mm.py to pgtable.py.
2. Add aarch64 kernel config and memory constants value.
3. Add below aarch64 page operation helper commands.
page_to_pfn, page_to_phys, pfn_to_page, page_address,
virt_to_phys, sym_to_pfn, pfn_to_kaddr, virt_to_page.
4. Only support CONFIG_SPARSEMEM_VMEMMAP=y now.
Link: https://lkml.kernel.org/r/20230808083020.22254-5-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>
Signed-off-by: Mark Salter <msalter@redhat.com>
2024-10-03 17:23:43 +00:00
|
|
|
import linux.pgtable
|
2024-10-03 17:23:43 +00:00
|
|
|
import linux.mm
|