Home
last modified time | relevance | path

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

12

/Linux-v4.19/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")
35 class LxVersion(gdb.Command):
40 super(LxVersion, self).__init__("lx-version", gdb.COMMAND_DATA)
44 gdb.write(gdb.parse_and_eval("linux_banner").string())
66 resource = gdb.parse_and_eval(resource_str)
72 gdb.write(" " * depth * 2 +
78 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 …]
Dlists.py14 import gdb
25 raise gdb.GdbError("Must be struct list_head not {}"
47 raise gdb.GdbError('argument must be of type (struct list_head [*])')
50 gdb.write("Starting with: {}\n".format(c))
51 except gdb.MemoryError:
52 gdb.write('head is not accessible\n')
59 gdb.write('prev.next != current: '
68 except gdb.MemoryError:
69 gdb.write('prev is not accessible: '
77 gdb.write('next.prev != current: '
[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(),
80 endian = gdb.execute("show endian", to_string=True)
[all …]
Ddmesg.py14 import gdb
20 class LxDmesg(gdb.Command):
24 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
27 log_buf_addr = int(str(gdb.parse_and_eval(
29 log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
30 log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
31 log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
33 inf = gdb.inferiors()[0]
50 gdb.write("Corrupted log buffer!\n")
68 gdb.write(msg)
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(
95 ia64_task_size = gdb.parse_and_eval("sizeof(struct task_struct)")
105 class LxThreadInfoFunc (gdb.Function):
121 class LxThreadInfoByPidFunc (gdb.Function):
[all …]
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")
Dconstants.py.in2 * gdb helper commands and functions for Linux kernel debugging
25 #define LX_GDBPARSED(x) LX_##x = gdb.parse_and_eval(XSTRING(x))
37 import gdb
DMakefile2 always := gdb-scripts
6 $(obj)/gdb-scripts:
/Linux-v4.19/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-v4.19/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-v4.19/Documentation/virtual/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-v4.19/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-v4.19/Documentation/translations/zh_CN/
Doops-tracing.txt57 使用在Documentation/kdump/gdbmacros.txt中定义的dmesg gdb宏,从旧的内存中提取内核
74 gdb /usr/src/linux/vmlinux
75 gdb> disassemble <offending_function>
106 然后你会比gdb反汇编更清楚的知道发生了什么。
/Linux-v4.19/scripts/
DMakefile43 subdir-$(CONFIG_GDB_SCRIPTS) += gdb
/Linux-v4.19/fs/ext4/
Dresize.c540 struct buffer_head *gdb; in setup_new_flex_group_blocks() local
547 gdb = sb_getblk(sb, block); in setup_new_flex_group_blocks()
548 if (unlikely(!gdb)) { in setup_new_flex_group_blocks()
553 BUFFER_TRACE(gdb, "get_write_access"); in setup_new_flex_group_blocks()
554 err = ext4_journal_get_write_access(handle, gdb); in setup_new_flex_group_blocks()
556 brelse(gdb); in setup_new_flex_group_blocks()
559 memcpy(gdb->b_data, sbi->s_group_desc[j]->b_data, in setup_new_flex_group_blocks()
560 gdb->b_size); in setup_new_flex_group_blocks()
561 set_buffer_uptodate(gdb); in setup_new_flex_group_blocks()
563 err = ext4_handle_dirty_metadata(handle, NULL, gdb); in setup_new_flex_group_blocks()
[all …]
/Linux-v4.19/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
/Linux-v4.19/Documentation/s390/
DDebugging390.txt33 Stack chaining in gdb by hand
727 If using gdb & you would like accurate displays of registers &
739 some bugs, please make sure you are using gdb-5.0 or later developed
1572 N.B. if compiling for debugging gdb works better without optimisation
1577 gdb <victim program> <optional corefile>
1585 Note gdb's online help is very good use it.
1646 quit: exits gdb.
1681 As an aside unfortunately gdb's, architecture independent watchpoint code
1717 what gdb does when the victim receives certain signals.
1727 Adds directories to be searched for source if gdb cannot find the source.
[all …]
/Linux-v4.19/Documentation/admin-guide/LSM/
DYama.rst32 parent to a child process (i.e. direct "gdb EXE" and "strace EXE" still
33 work), or with ``CAP_SYS_PTRACE`` (i.e. "gdb --pid=PID", and "strace -p PID"
/Linux-v4.19/
D.gitignore56 /vmlinux-gdb.py
DKbuild81 @$(MAKE) $(build)=scripts/gdb/linux $@
/Linux-v4.19/Documentation/cgroup-v1/
Dfreezer-subsystem.txt44 signals is gdb. In fact any program designed to use ptrace is likely to
49 being frozen. This allows the bash example above and gdb to run as

12