| /linux-6.15/scripts/gdb/linux/ |
| H A D | proc.py | 15 import gdb 25 class LxCmdLine(gdb.Command): 33 gdb.write(gdb.parse_and_eval("saved_command_line").string() + "\n") 39 class LxVersion(gdb.Command): 48 gdb.write(gdb.parse_and_eval("(char *)linux_banner").string()) 83 class LxIOMem(gdb.Command): 98 class LxIOPorts(gdb.Command): 141 class LxMounts(gdb.Command): 159 except gdb.error: 207 class LxFdtDump(gdb.Command): [all …]
|
| H A D | cpus.py | 14 import gdb 27 return gdb.selected_thread().num - 1 39 offset = gdb.parse_and_eval( 43 offset = gdb.parse_and_eval( 45 except gdb.error: 59 if hasattr(gdb.events, 'new_objfile'): 70 if hasattr(gdb, 'events'): 122 class LxCpus(gdb.Command): 141 class PerCpu(gdb.Function): 158 class PerCpuPtr(gdb.Function): [all …]
|
| H A D | page_owner.py | 9 import gdb 27 gdb.write("Unrecognized command\n") 28 raise gdb.GdbError(t) 30 class DumpPageOwner(gdb.Command): 51 argv = gdb.string_to_argv(args) 70 if page_ext == gdb.Value(0): 84 return gdb.Value(0) 89 if page_ext != gdb.Value(0): 92 return gdb.Value(0) 103 gdb.write("pfn is invalid\n") [all …]
|
| H A D | stackdepot.py | 9 import gdb 20 gdb.write("Unrecognized command\n") 21 raise gdb.GdbError(t) 35 pools_num = gdb.parse_and_eval('pools_num') 38 raise gdb.GdbError("handle is 0\n") 43 return gdb.Value(0), 0 53 gdb.write("%s\n" % e) 54 return gdb.Value(0), 0 66 gdb.write("%s\n" % e) 68 class StackDepotLookup(gdb.Command): [all …]
|
| H A D | vmalloc.py | 9 import gdb 22 class LxVmallocInfo(gdb.Command): 30 raise gdb.GdbError("Requires MMU support") 34 vn = gdb.parse_and_eval('&vmap_nodes[%d]' % i) 49 gdb.write(" ioremap") 51 gdb.write(" vmalloc") 53 gdb.write(" vmap") 55 gdb.write(" user") 57 gdb.write(" dma-coherent") 59 gdb.write(" vpages") [all …]
|
| H A D | symbols.py | 14 import gdb 23 if hasattr(gdb, 'Breakpoint'): 63 inferior = gdb.selected_inferior() 74 except gdb.error as e: 75 gdb.write("{}\n".format(e)) 81 class LxSymbols(gdb.Command): 120 except gdb.error: 171 gdb.write("loading vmlinux\n") 176 if hasattr(gdb, 'breakpoints') and not gdb.breakpoints() is None: 182 for obj in gdb.objfiles(): [all …]
|
| H A D | utils.py | 19 import gdb 33 self._type = gdb.lookup_type(self._name) 35 raise gdb.GdbError( 37 if hasattr(gdb, 'events') and hasattr(gdb.events, 'new_objfile'): 70 element = gdb.Value(0).cast(typeobj) 79 class ContainerOf(gdb.Function): 175 if hasattr(gdb.Frame, 'architecture'): 198 except gdb.error: 205 except gdb.error: 221 return gdb.parse_and_eval(expresssion) [all …]
|
| H A D | slab.py | 9 import gdb 34 track_type = gdb.lookup_type('struct track') 158 while p != gdb.Value(0): 230 gdb.write(" cpus=") 232 gdb.write("\n") 236 gdb.write("\n") 248 gdb.write("Unrecognized command\n") 249 raise gdb.GdbError(t) 251 class LxSlabTrace(gdb.Command): 261 argv = gdb.string_to_argv(arg) [all …]
|
| H A D | mm.py | 9 import gdb 290 class LxPFN2Page(gdb.Command): 297 argv = gdb.string_to_argv(arg) 304 class LxPage2PFN(gdb.Command): 311 argv = gdb.string_to_argv(arg) 319 class LxPageAddress(gdb.Command): 334 class LxPage2Phys(gdb.Command): 349 class LxVirt2Phys(gdb.Command): 363 class LxVirt2Page(gdb.Command): 377 class LxSym2PFN(gdb.Command): [all …]
|
| H A D | lists.py | 14 import gdb 72 gdb.write("Starting with: {}\n".format(c)) 73 except gdb.MemoryError: 74 gdb.write('head is not accessible\n') 90 except gdb.MemoryError: 91 gdb.write('prev is not accessible: ' 108 except gdb.MemoryError: 109 gdb.write('next is not accessible: ' 122 class LxListChk(gdb.Command): 130 argv = gdb.string_to_argv(arg) [all …]
|
| H A D | modules.py | 14 import gdb 44 class LxModule(gdb.Function): 65 class LxLsmod(gdb.Command): 74 gdb.write( 96 gdb.write("{separator}{name}".format( 101 gdb.write("\n") 108 gdb.write("Unrecognized command\n") 109 raise gdb.GdbError(t) 111 class LxFindTextAddrinMod(gdb.Command): 118 args = gdb.string_to_argv(arg) [all …]
|
| H A 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" % ( 45 raise gdb.GdbError("No clocks registered") 46 gdb.write(" enable prepare protect \n") 49 for clk in clk_core_for_each_child(gdb.parse_and_eval("clk_root_list")): 51 for clk in clk_core_for_each_child(gdb.parse_and_eval("clk_orphan_list")): 58 class LxClkCoreLookup(gdb.Function): 74 return (self.lookup_hlist(gdb.parse_and_eval("clk_root_list"), name) or [all …]
|
| H A 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)) 97 class LxDeviceListBus(gdb.Command): 117 class LxDeviceListClass(gdb.Command): 135 class LxDeviceListTree(gdb.Command): 144 dev = gdb.parse_and_eval(arg) 150 class LxDeviceFindByBusName(gdb.Function): [all …]
|
| H A 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") 28 py_config_ptr_end = gdb.parse_and_eval("&kernel_config_data_end") 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")
|
| H A 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))) 74 raise gdb.GdbError("No power domain(s) registered") 75 gdb.write('domain status children\n'); 76 gdb.write(' /device runtime status\n'); 77 gdb.write('----------------------------------------------------------------------\n'); 79 gdb.parse_and_eval('&gpd_list'),
|
| H A D | tasks.py | 14 import gdb 24 init_task = gdb.parse_and_eval("init_task").address 45 class LxTaskByPidFunc(gdb.Function): 59 raise gdb.GdbError("No task of PID " + str(pid)) 65 class LxPs(gdb.Command): 69 super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) 72 gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) 74 gdb.write("{} {:^5} {}\n".format( 94 class LxThreadInfoFunc (gdb.Function): 110 class LxThreadInfoByPidFunc (gdb.Function): [all …]
|
| H A D | rbtree.py | 5 import gdb 29 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) 58 parent = gdb.Value(node['__rb_parent_color'] & ~3) 112 class LxRbFirst(gdb.Function): 124 raise gdb.GdbError("No entry in tree") 132 class LxRbLast(gdb.Function): 144 raise gdb.GdbError("No entry in tree") 152 class LxRbNext(gdb.Function): 164 raise gdb.GdbError("No entry in tree") 172 class LxRbPrev(gdb.Function): [all …]
|
| H A D | kasan.py | 9 import gdb 16 gdb.write("Unrecognized command\n") 17 raise gdb.GdbError(t) 19 class KasanMemToShadow(gdb.Command): 26 super(KasanMemToShadow, self).__init__("lx-kasan_mem_to_shadow", gdb.COMMAND_SUPPORT) 30 raise gdb.GdbError('CONFIG_KASAN_GENERIC or CONFIG_KASAN_SW_TAGS is not set') 32 argv = gdb.string_to_argv(args) 38 gdb.write('shadow addr: 0x%x\n' % shadow_addr)
|
| H A D | interrupts.py | 5 import gdb 76 gdb.lookup_type("struct irqaction") 101 irq_stat = gdb.parse_and_eval("&irq_stat") 110 pvar = gdb.parse_and_eval(var) 205 class LxInterruptList(gdb.Command): 212 nr_irqs = gdb.parse_and_eval("nr_irqs") 219 gdb.write("%*s" % (prec + 8, "")) 221 gdb.write("CPU%-8d" % cpu) 222 gdb.write("\n") 228 gdb.write(show_irq_desc(prec, irq)) [all …]
|
| H A D | pgtable.py | 11 import gdb 15 PHYSICAL_ADDRESS_MASK = gdb.parse_and_eval('0xfffffffffffff') 21 return gdb.parse_and_eval('(u64) ~0xfff') 24 return gdb.parse_and_eval('(u64) ~0x1fffff') 27 return gdb.parse_and_eval('(u64) ~0x3fffffff') 37 return gdb.parse_and_eval(pob) 197 class TranslateVM(gdb.Command): 209 vm_address = gdb.parse_and_eval(f'{arg}') 210 cr3_data = gdb.parse_and_eval('$cr3') 211 cr4 = gdb.parse_and_eval('$cr4') [all …]
|
| H A D | timerlist.py | 6 import gdb 23 tk_core = gdb.parse_and_eval("&tk_core") 70 jiffies = gdb.parse_and_eval("jiffies_64") 71 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] 181 class LxTimerList(gdb.Command): 188 hrtimer_bases = gdb.parse_and_eval("&hrtimer_bases") 201 bc_dev = gdb.parse_and_eval("&tick_broadcast_device") 204 mask = gdb.parse_and_eval("tick_broadcast_mask") [all …]
|
| /linux-6.15/Documentation/translations/zh_CN/dev-tools/ |
| H A D | gdb-kernel-debugging.rst | 8 通过gdb调试内核和模块 37 - 构建gdb脚本(适用于内核v5.1版本及以上) 51 - 启动gdb:gdb vmlinux 54 如果gdb报告拒绝加载vmlinux-gdb.py(相关命令找不到),请将:: 62 (gdb) target remote :1234 65 使用Linux提供的gdb脚本的示例 70 (gdb) lx-symbols 83 (gdb) b btrfs_init_sysfs 90 (gdb) c 104 (gdb) lx-dmesg [all …]
|
| /linux-6.15/Documentation/translations/zh_TW/dev-tools/ |
| H A D | gdb-kernel-debugging.rst | 8 通過gdb調試內核和模塊 47 - 啓動gdb:gdb vmlinux 50 如果gdb報告拒絕加載vmlinux-gdb.py(相關命令找不到),請將:: 58 (gdb) target remote :1234 61 使用Linux提供的gdb腳本的示例 66 (gdb) lx-symbols 79 (gdb) b btrfs_init_sysfs 86 (gdb) c 100 (gdb) lx-dmesg 112 (gdb) p $lx_current().pid [all …]
|
| /linux-6.15/Documentation/process/debugging/ |
| H A D | gdb-kernel-debugging.rst | 3 Debugging kernel and modules via gdb 57 - Start gdb: gdb vmlinux 60 directories. In case gdb reports to refuse loading vmlinux-gdb.py, add:: 68 (gdb) target remote :1234 76 (gdb) lx-symbols 89 (gdb) b btrfs_init_sysfs 96 (gdb) c 111 (gdb) lx-dmesg 123 (gdb) p $lx_current().pid 125 (gdb) p $lx_current().comm [all …]
|
| /linux-6.15/Documentation/translations/zh_TW/admin-guide/ |
| H A D | bug-hunting.rst | 109 gdb section in 找到缺陷位置 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 160 $ gdb drivers/tty/vt/vt_ioctl.o 161 (gdb) l *vt_ioctl+0xda8 173 $ gdb fs/jbd/jbd.ko [all …]
|