/Linux-v5.10/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 24 return gdb.selected_thread().num - 1 26 tid = gdb.selected_thread().ptid[2] 32 raise gdb.GdbError("Sorry, obtaining the current CPU is not yet " 40 offset = gdb.parse_and_eval( 44 offset = gdb.parse_and_eval( 46 except gdb.error: 59 gdb.events.stop.disconnect(cpu_mask_invalidate) 60 if hasattr(gdb.events, 'new_objfile'): 61 gdb.events.new_objfile.disconnect(cpu_mask_invalidate) [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 | 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 | lists.py | 14 import gdb 64 raise gdb.GdbError('argument must be of type (struct list_head [*])') 67 gdb.write("Starting with: {}\n".format(c)) 68 except gdb.MemoryError: 69 gdb.write('head is not accessible\n') 76 gdb.write('prev.next != current: ' 85 except gdb.MemoryError: 86 gdb.write('prev is not accessible: ' 94 gdb.write('next.prev != current: ' 103 except gdb.MemoryError: [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.10/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 68 such as gdb to more accurately construct stack back traces while 112 used for anything in the gdb interface to kgdb. The ``CONFIG_KDB_KEYBOARD`` 137 to communicate from gdb to kgdb as well as the devices you want to use [all …]
|
D | index.rst | 25 gdb-kernel-debugging
|
/Linux-v5.10/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.10/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.10/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.10/Documentation/bpf/ |
D | s390.rst | 51 gdb-multiarch \ 116 Compiling kernel, modules and testsuite, as well as preparing gdb scripts to 176 It is preferable to turn KASLR off, so that gdb would know where to find the 183 gdb-multiarch -ex 'target remote localhost:1234' ./vmlinux
|
/Linux-v5.10/tools/testing/selftests/rcutorture/bin/ |
D | kvm-test-1-run.sh | 194 echo " gdb $base_resdir/vmlinux" > /dev/tty 195 echo 'After symbols load and the "(gdb)" prompt appears:' > /dev/tty
|
/Linux-v5.10/fs/ext4/ |
D | resize.c | 553 struct buffer_head *gdb; in setup_new_flex_group_blocks() local 560 gdb = sb_getblk(sb, block); in setup_new_flex_group_blocks() 561 if (unlikely(!gdb)) { in setup_new_flex_group_blocks() 566 BUFFER_TRACE(gdb, "get_write_access"); in setup_new_flex_group_blocks() 567 err = ext4_journal_get_write_access(handle, gdb); in setup_new_flex_group_blocks() 569 brelse(gdb); in setup_new_flex_group_blocks() 572 memcpy(gdb->b_data, sbi_array_rcu_deref(sbi, in setup_new_flex_group_blocks() 573 s_group_desc, j)->b_data, gdb->b_size); in setup_new_flex_group_blocks() 574 set_buffer_uptodate(gdb); in setup_new_flex_group_blocks() 576 err = ext4_handle_dirty_metadata(handle, NULL, gdb); in setup_new_flex_group_blocks() [all …]
|
/Linux-v5.10/scripts/ |
D | Makefile | 40 subdir- += basic dtc gdb kconfig mod
|