xref: /openbmc/linux/scripts/gdb/vmlinux-gdb.py (revision 081e8df6)
1#
2# gdb helper commands and functions for Linux kernel debugging
3#
4#  loader module
5#
6# Copyright (c) Siemens AG, 2012, 2013
7#
8# Authors:
9#  Jan Kiszka <jan.kiszka@siemens.com>
10#
11# This work is licensed under the terms of the GNU GPL version 2.
12#
13
14import os
15
16sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/scripts/gdb")
17
18try:
19    gdb.parse_and_eval("0")
20    gdb.execute("", to_string=True)
21except:
22    gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
23              "work.\n")
24else:
25    import linux.constants
26    if linux.constants.LX_CONFIG_DEBUG_INFO_REDUCED:
27        raise gdb.GdbError("Reduced debug information will prevent GDB "
28                           "from having complete types.\n")
29    import linux.utils
30    import linux.symbols
31    import linux.modules
32    import linux.dmesg
33    import linux.tasks
34    import linux.config
35    import linux.cpus
36    import linux.lists
37    import linux.rbtree
38    import linux.proc
39    import linux.timerlist
40    import linux.clk
41    import linux.genpd
42    import linux.device
43    import linux.vfs
44    import linux.mm
45    import linux.radixtree
46    import linux.interrupts
47