/Linux-v5.15/scripts/gdb/linux/ |
D | proc.py | 14 import gdb 22 class LxCmdLine(gdb.Command): 27 super(LxCmdLine, self).__init__("lx-cmdline", gdb.COMMAND_DATA) 30 gdb.write(gdb.parse_and_eval("saved_command_line").string() + "\n") 36 class LxVersion(gdb.Command): 41 super(LxVersion, self).__init__("lx-version", gdb.COMMAND_DATA) 45 gdb.write(gdb.parse_and_eval("(char *)linux_banner").string()) 68 resource = gdb.parse_and_eval(resource_str) 74 gdb.write(" " * depth * 2 + 80 class LxIOMem(gdb.Command): [all …]
|
D | cpus.py | 14 import gdb 27 return gdb.selected_thread().num - 1 29 tid = gdb.selected_thread().ptid[2] 35 raise gdb.GdbError("Sorry, obtaining the current CPU is not yet " 43 offset = gdb.parse_and_eval( 47 offset = gdb.parse_and_eval( 49 except gdb.error: 62 gdb.events.stop.disconnect(cpu_mask_invalidate) 63 if hasattr(gdb.events, 'new_objfile'): 64 gdb.events.new_objfile.disconnect(cpu_mask_invalidate) [all …]
|
D | utils.py | 14 import gdb 24 gdb.events.new_objfile.disconnect(self._new_objfile_handler) 28 self._type = gdb.lookup_type(self._name) 30 raise gdb.GdbError( 32 if hasattr(gdb, 'events') and hasattr(gdb.events, 'new_objfile'): 33 gdb.events.new_objfile.connect(self._new_objfile_handler) 46 element = gdb.Value(0).cast(typeobj) 55 class ContainerOf(gdb.Function): 66 return container_of(ptr, gdb.lookup_type(typename.string()).pointer(), 81 endian = gdb.execute("show endian", to_string=True) [all …]
|
D | symbols.py | 14 import gdb 21 if hasattr(gdb, 'Breakpoint'): 22 class LoadModuleBreakpoint(gdb.Breakpoint): 29 module = gdb.parse_and_eval("mod") 39 show_pagination = gdb.execute("show pagination", to_string=True) 41 gdb.execute("set pagination off") 44 gdb.write("refreshing all symbols to reload module " 51 gdb.execute("set pagination %s" % ("on" if pagination else "off")) 56 class LxSymbols(gdb.Command): 71 super(LxSymbols, self).__init__("lx-symbols", gdb.COMMAND_FILES, [all …]
|
D | lists.py | 14 import gdb 31 gdb.write("list_for_each: Uninitialized list '{}' treated as empty\n" 69 raise gdb.GdbError('argument must be of type (struct list_head [*])') 72 gdb.write("Starting with: {}\n".format(c)) 73 except gdb.MemoryError: 74 gdb.write('head is not accessible\n') 81 gdb.write('prev.next != current: ' 90 except gdb.MemoryError: 91 gdb.write('prev is not accessible: ' 99 gdb.write('next.prev != current: ' [all …]
|
D | device.py | 5 import gdb 36 for kobj in kset_for_each_object(gdb.parse_and_eval('bus_kset')): 43 for kobj in kset_for_each_object(gdb.parse_and_eval('class_kset')): 53 raise gdb.GdbError("Can't find bus type {!r}".format(name)) 60 raise gdb.GdbError("Can't find device class {!r}".format(name)) 91 gdb.write('{}dev {}:\t{}\n'.format('\t' * level, dev_name(dev), dev)) 97 class LxDeviceListBus(gdb.Command): 101 super(LxDeviceListBus, self).__init__('lx-device-list-bus', gdb.COMMAND_DATA) 106 gdb.write('bus {}:\t{}\n'.format(bus['name'].string(), bus)) 112 raise gdb.GdbError("Can't find bus {!r}".format(arg)) [all …]
|
D | config.py | 5 import gdb 11 class LxConfigDump(gdb.Command): 17 super(LxConfigDump, self).__init__("lx-configdump", gdb.COMMAND_DATA, 18 gdb.COMPLETE_FILENAME) 27 py_config_ptr = gdb.parse_and_eval("kernel_config_data + 8") 28 py_config_size = gdb.parse_and_eval( 30 except gdb.error as e: 31 raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?") 33 inf = gdb.inferiors()[0] 41 gdb.write("Dumped config to " + filename + "\n")
|
D | clk.py | 5 import gdb 18 class LxClkSummary(gdb.Command): 27 super(LxClkSummary, self).__init__("lx-clk-summary", gdb.COMMAND_DATA) 30 gdb.write("%*s%-*s %7d %8d %8d %11lu%s\n" % ( 44 gdb.write(" enable prepare protect \n") 45 gdb.write(" clock count count count rate \n") 46 gdb.write("------------------------------------------------------------------------\n") 47 for clk in clk_core_for_each_child(gdb.parse_and_eval("clk_root_list")): 49 for clk in clk_core_for_each_child(gdb.parse_and_eval("clk_orphan_list")): 56 class LxClkCoreLookup(gdb.Function): [all …]
|
D | tasks.py | 14 import gdb 24 init_task = gdb.parse_and_eval("init_task").address 49 class LxTaskByPidFunc(gdb.Function): 63 raise gdb.GdbError("No task of PID " + str(pid)) 69 class LxPs(gdb.Command): 73 super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) 76 gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) 78 gdb.write("{} {:^5} {}\n".format( 97 ia64_task_size = gdb.parse_and_eval("sizeof(struct task_struct)") 107 class LxThreadInfoFunc (gdb.Function): [all …]
|
D | rbtree.py | 5 import gdb 17 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) 33 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) 46 parent = gdb.Value(node['__rb_parent_color'] & ~3) 58 raise gdb.GdbError("Must be struct rb_node not {}".format(node.type)) 81 raise gdb.GdbError("Must be struct rb_node not {}".format(node.type)) 100 class LxRbFirst(gdb.Function): 112 raise gdb.GdbError("No entry in tree") 120 class LxRbLast(gdb.Function): 132 raise gdb.GdbError("No entry in tree") [all …]
|
D | genpd.py | 5 import gdb 38 class LxGenPDSummary(gdb.Command): 44 super(LxGenPDSummary, self).__init__('lx-genpd-summary', gdb.COMMAND_DATA) 59 gdb.write('%-30s %-15s %s\n' % ( 70 gdb.write(' %-50s %s\n' % (kobj_path, rtpm_status_str(dev))) 73 gdb.write('domain status children\n'); 74 gdb.write(' /device runtime status\n'); 75 gdb.write('----------------------------------------------------------------------\n'); 77 gdb.parse_and_eval('&gpd_list'),
|
D | modules.py | 14 import gdb 41 class LxModule(gdb.Function): 56 raise gdb.GdbError("Unable to find MODULE " + mod_name) 62 class LxLsmod(gdb.Command): 68 super(LxLsmod, self).__init__("lx-lsmod", gdb.COMMAND_DATA) 71 gdb.write( 77 gdb.write("{address} {name:<19} {size:>8} {ref}".format( 87 gdb.write("{separator}{name}".format( 92 gdb.write("\n")
|
D | timerlist.py | 6 import gdb 23 tk_core = gdb.parse_and_eval("&tk_core") 71 jiffies = gdb.parse_and_eval("jiffies_64") 72 tick_sched_ptr = gdb.parse_and_eval("&tick_cpu_sched") 154 nr_cpu_ids = gdb.parse_and_eval("nr_cpu_ids") 156 inf = gdb.inferiors()[0] 179 class LxTimerList(gdb.Command): 183 super(LxTimerList, self).__init__("lx-timerlist", gdb.COMMAND_DATA) 186 hrtimer_bases = gdb.parse_and_eval("&hrtimer_bases") 187 max_clock_bases = gdb.parse_and_eval("HRTIMER_MAX_CLOCK_BASES") [all …]
|
D | dmesg.py | 14 import gdb 27 class LxDmesg(gdb.Command): 31 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA) 34 inf = gdb.inferiors()[0] 37 prb_addr = int(str(gdb.parse_and_eval("(void *)'printk.c'::prb")).split()[0], 16) 147 gdb.write(msg)
|
D | constants.py.in | 2 * gdb helper commands and functions for Linux kernel debugging 28 #define LX_GDBPARSED(x) LX_##x = gdb.parse_and_eval(XSTRING(x)) 40 import gdb
|
/Linux-v5.15/Documentation/dev-tools/ |
D | gdb-kernel-debugging.rst | 3 Debugging kernel and modules via gdb 8 using gdb. Gdb comes with a powerful scripting interface for python. The 12 be transferred to the other gdb stubs as well. 18 - gdb 7.2+ (recommended: 7.4+) with python support enabled (typically true 42 - Enable the gdb stub of QEMU/KVM, either 53 - Start gdb: gdb vmlinux 55 Note: Some distros may restrict auto-loading of gdb scripts to known safe 56 directories. In case gdb reports to refuse loading vmlinux-gdb.py, add:: 60 to ~/.gdbinit. See gdb help for more details. 64 (gdb) target remote :1234 [all …]
|
D | kgdb.rst | 26 kernel. It is used along with gdb to debug a Linux kernel. The 27 expectation is that gdb can be used to "break in" to the kernel to 29 similar to the way an application developer would use gdb to debug an 36 instance of gdb against the vmlinux file which contains the symbols (not 37 a boot image such as bzImage, zImage, uImage...). In gdb the developer 39 connection a developer makes with gdb depends on the availability of 59 file, gdb tends not to be very useful without the symbolic data, so you 67 or on the stack at different points which allows a debugger such as gdb to 111 used for anything in the gdb interface to kgdb. The ``CONFIG_KDB_KEYBOARD`` 136 to communicate from gdb to kgdb as well as the devices you want to use [all …]
|
/Linux-v5.15/Documentation/translations/zh_CN/admin-guide/ |
D | bug-hunting.rst | 104 通常来说使用 ``gdb`` 会比较容易,不过内核需要用调试信息来预编译。 106 gdb subsection 109 GNU 调试器(GNU debugger, ``gdb`` )是从 ``vmlinux`` 文件中找出OOPS的确切 112 在使用 ``CONFIG_DEBUG_INFO`` 编译的内核上使用gdb效果最好。可通过运行以下命令 123 $ gdb vmlinux 124 (gdb) l *0xc021e50e 134 $ gdb vmlinux 135 (gdb) l *vt_ioctl+0xda8 150 (gdb) p vt_ioctl 152 (gdb) l *0xae0+0xda8 [all …]
|
D | README.rst | 338 - 或者,您可以在正在运行的内核上使用gdb(只读的;即不能更改值或设置断点)。 342 使用新内核重新启动后,执行 ``gdb vmlinux /proc/kcore`` 。现在可以使用所有 343 普通的gdb命令。查找系统崩溃点的命令是 ``l *0xXXXXXXXX`` (将xxx替换为EIP 346 用gdb无法调试一个当前未运行的内核是由于gdb(错误地)忽略了编译内核的起始
|
/Linux-v5.15/Documentation/translations/zh_TW/admin-guide/ |
D | bug-hunting.rst | 107 通常來說使用 ``gdb`` 會比較容易,不過內核需要用調試信息來預編譯。 109 gdb subsection 112 GNU 調試器(GNU debugger, ``gdb`` )是從 ``vmlinux`` 文件中找出OOPS的確切 115 在使用 ``CONFIG_DEBUG_INFO`` 編譯的內核上使用gdb效果最好。可通過運行以下命令 126 $ gdb vmlinux 127 (gdb) l *0xc021e50e 137 $ gdb vmlinux 138 (gdb) l *vt_ioctl+0xda8 153 (gdb) p vt_ioctl 155 (gdb) l *0xae0+0xda8 [all …]
|
D | README.rst | 341 - 或者,您可以在正在運行的內核上使用gdb(只讀的;即不能更改值或設置斷點)。 345 使用新內核重新啓動後,執行 ``gdb vmlinux /proc/kcore`` 。現在可以使用所有 346 普通的gdb命令。查找系統崩潰點的命令是 ``l *0xXXXXXXXX`` (將xxx替換爲EIP 349 用gdb無法調試一個當前未運行的內核是由於gdb(錯誤地)忽略了編譯內核的起始
|
/Linux-v5.15/scripts/gdb/ |
D | vmlinux-gdb.py | 19 gdb.parse_and_eval("0") 20 gdb.execute("", to_string=True) 22 gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to "
|
/Linux-v5.15/Documentation/admin-guide/ |
D | bug-hunting.rst | 106 ``gdb`` is easier, but the Kernel should be pre-compiled with debug info. 108 gdb subsection 111 The GNU debugger (``gdb``) is the best way to figure out the exact file and line 114 The usage of gdb works best on a kernel compiled with ``CONFIG_DEBUG_INFO``. 126 $ gdb vmlinux 127 (gdb) l *0xc021e50e 138 $ gdb vmlinux 139 (gdb) l *vt_ioctl+0xda8 154 (gdb) p vt_ioctl 156 (gdb) l *0xae0+0xda8 [all …]
|
/Linux-v5.15/Documentation/translations/zh_CN/ |
D | oops-tracing.txt | 57 使用在Documentation/admin-guide/kdump/gdbmacros.txt中定义的dmesg gdb宏,从旧的内存中提取内核 74 gdb /usr/src/linux/vmlinux 75 gdb> disassemble <offending_function> 106 然后你会比gdb反汇编更清楚的知道发生了什么。
|
/Linux-v5.15/Documentation/translations/zh_TW/ |
D | oops-tracing.txt | 56 使用在Documentation/admin-guide/kdump/gdbmacros.txt中定義的dmesg gdb宏,從舊的內存中提取內核 73 gdb /usr/src/linux/vmlinux 74 gdb> disassemble <offending_function> 105 然後你會比gdb反彙編更清楚的知道發生了什麼。
|