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