Home
last modified time | relevance | path

Searched refs:gdb (Results 1 – 25 of 40) sorted by relevance

12

/Linux-v5.4/scripts/gdb/linux/
Dproc.py14 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 …]
Dcpus.py14 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 …]
Dsymbols.py14 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 …]
Dutils.py14 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 …]
Dlists.py14 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 …]
Ddevice.py5 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 …]
Dconfig.py5 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")
Dclk.py5 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 …]
Drbtree.py5 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 …]
Dtasks.py14 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)
77 gdb.write("{address} {pid} {comm}\n".format(
96 ia64_task_size = gdb.parse_and_eval("sizeof(struct task_struct)")
106 class LxThreadInfoFunc (gdb.Function):
122 class LxThreadInfoByPidFunc (gdb.Function):
[all …]
Dgenpd.py5 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 slaves\n');
74 gdb.write(' /device runtime status\n');
75 gdb.write('----------------------------------------------------------------------\n');
77 gdb.parse_and_eval('&gpd_list'),
Ddmesg.py14 import gdb
22 class LxDmesg(gdb.Command):
26 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
29 log_buf_addr = int(str(gdb.parse_and_eval(
31 log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
32 log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
33 log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
35 inf = gdb.inferiors()[0]
57 gdb.write("Corrupted log buffer!\n")
76 gdb.write(msg)
Dmodules.py14 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")
Dtimerlist.py6 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 …]
Dconstants.py.in2 * 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.4/Documentation/dev-tools/
Dgdb-kernel-debugging.rst3 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 …]
Dkgdb.rst26 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 …]
Dindex.rst24 gdb-kernel-debugging
/Linux-v5.4/scripts/gdb/
Dvmlinux-gdb.py19 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.4/Documentation/virt/uml/
DUserModeLinux-HOWTO.txt89 11.1 Starting the kernel under gdb
93 11.5 Attaching gdb to the kernel
2473 possible to debug it with gdb almost like any other process. It is
2475 ptraced for system call interception, so gdb can't ptrace them.
2483 ptrace proxy so that gdb works with UML, respectively.
2488 11.1. Starting the kernel under gdb
2490 You can have the kernel running under the control of gdb from the
2492 xterm with gdb running inside it. The kernel will send some commands
2493 to gdb which will leave it stopped at the beginning of start_kernel.
2506 you ^C gdb and get a backtrace, you will see the idle thread, which
[all …]
/Linux-v5.4/Documentation/admin-guide/
Dbug-hunting.rst102 ``gdb`` is easier, but the Kernel should be pre-compiled with debug info.
104 gdb subsection
107 The GNU debug (``gdb``) is the best way to figure out the exact file and line
110 The usage of gdb works best on a kernel compiled with ``CONFIG_DEBUG_INFO``.
122 $ gdb vmlinux
123 (gdb) l *0xc021e50e
134 $ gdb vmlinux
135 (gdb) l *vt_ioctl+0xda8
150 (gdb) p vt_ioctl
152 (gdb) l *0xae0+0xda8
[all …]
/Linux-v5.4/Documentation/translations/zh_CN/
Doops-tracing.txt57 使用在Documentation/admin-guide/kdump/gdbmacros.txt中定义的dmesg gdb宏,从旧的内存中提取内核
74 gdb /usr/src/linux/vmlinux
75 gdb> disassemble <offending_function>
106 然后你会比gdb反汇编更清楚的知道发生了什么。
/Linux-v5.4/scripts/
DMakefile39 subdir- += basic dtc gdb kconfig mod
/Linux-v5.4/fs/ext4/
Dresize.c544 struct buffer_head *gdb; in setup_new_flex_group_blocks() local
551 gdb = sb_getblk(sb, block); in setup_new_flex_group_blocks()
552 if (unlikely(!gdb)) { in setup_new_flex_group_blocks()
557 BUFFER_TRACE(gdb, "get_write_access"); in setup_new_flex_group_blocks()
558 err = ext4_journal_get_write_access(handle, gdb); in setup_new_flex_group_blocks()
560 brelse(gdb); in setup_new_flex_group_blocks()
563 memcpy(gdb->b_data, sbi->s_group_desc[j]->b_data, in setup_new_flex_group_blocks()
564 gdb->b_size); in setup_new_flex_group_blocks()
565 set_buffer_uptodate(gdb); in setup_new_flex_group_blocks()
567 err = ext4_handle_dirty_metadata(handle, NULL, gdb); in setup_new_flex_group_blocks()
[all …]
/Linux-v5.4/Documentation/
Ddebugging-via-ohci1394.txt70 There is also a gdb proxy for firewire which allows to use gdb to access
71 data which can be referenced from symbols found by gdb in vmlinux:
74 The latest version of this gdb proxy (fireproxy-0.34) can communicate (not

12