2015-02-17 13:46:36 -08: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
|
|
|
|
|
2022-07-12 12:02:48 +01:00
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/scripts/gdb")
|
2015-02-17 13:46:36 -08:00
|
|
|
|
|
|
|
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 13:46:41 -08:00
|
|
|
else:
|
2023-04-06 14:52:51 -07:00
|
|
|
import linux.constants
|
|
|
|
if linux.constants.LX_CONFIG_DEBUG_INFO_REDUCED:
|
|
|
|
raise gdb.GdbError("Reduced debug information will prevent GDB "
|
|
|
|
"from having complete types.\n")
|
2015-02-17 13:46:41 -08:00
|
|
|
import linux.utils
|
2015-02-17 13:46:47 -08:00
|
|
|
import linux.symbols
|
2015-02-17 13:46:55 -08:00
|
|
|
import linux.modules
|
2015-02-17 13:47:04 -08:00
|
|
|
import linux.dmesg
|
2015-02-17 13:47:10 -08:00
|
|
|
import linux.tasks
|
2019-05-14 15:45:53 -07:00
|
|
|
import linux.config
|
2015-02-17 13:47:21 -08:00
|
|
|
import linux.cpus
|
2015-06-30 14:58:07 -07:00
|
|
|
import linux.lists
|
2019-05-14 15:45:56 -07:00
|
|
|
import linux.rbtree
|
2016-03-22 14:27:33 -07:00
|
|
|
import linux.proc
|
2019-05-14 15:45:59 -07:00
|
|
|
import linux.timerlist
|
2019-05-14 15:46:08 -07:00
|
|
|
import linux.clk
|
2019-07-16 16:30:12 -07:00
|
|
|
import linux.genpd
|
2019-07-16 16:30:15 -07:00
|
|
|
import linux.device
|
2023-02-28 18:53:34 -06:00
|
|
|
import linux.vfs
|
2023-08-08 16:30:14 +08:00
|
|
|
import linux.pgtable
|
2023-04-04 14:40:49 -07:00
|
|
|
import linux.radixtree
|
2023-04-06 15:04:51 -07:00
|
|
|
import linux.interrupts
|
2023-08-08 16:30:14 +08:00
|
|
|
import linux.mm
|
2023-08-08 16:30:15 +08:00
|
|
|
import linux.stackdepot
|