Lines Matching refs:gdb

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):
86 super(LxIOMem, self).__init__("lx-iomem", gdb.COMMAND_DATA)
95 class LxIOPorts(gdb.Command):
101 super(LxIOPorts, self).__init__("lx-ioports", gdb.COMMAND_DATA)
138 class LxMounts(gdb.Command):
146 super(LxMounts, self).__init__("lx-mounts", gdb.COMMAND_DATA)
152 argv = gdb.string_to_argv(arg)
156 except gdb.error:
157 raise gdb.GdbError("Provide a PID as integer value")
163 raise gdb.GdbError("Couldn't find a process with PID {}"
168 raise gdb.GdbError("No namespace for current process")
170 gdb.write("{:^18} {:^15} {:>9} {} {} options\n".format(
196 gdb.write("{} {} {} {} {} {}{}{} 0 0\n".format(
205 class LxFdtDump(gdb.Command):
211 super(LxFdtDump, self).__init__("lx-fdtdump", gdb.COMMAND_DATA,
212 gdb.COMPLETE_FILENAME)
236 raise gdb.GdbError("Kernel not compiled with CONFIG_OF\n")
243 py_fdt_header_ptr = gdb.parse_and_eval(
250 raise gdb.GdbError("No flattened device tree magic found\n")
252 gdb.write("fdt_magic: 0x{:02X}\n".format(fdt_header[0]))
253 gdb.write("fdt_totalsize: 0x{:02X}\n".format(fdt_header[1]))
254 gdb.write("off_dt_struct: 0x{:02X}\n".format(fdt_header[2]))
255 gdb.write("off_dt_strings: 0x{:02X}\n".format(fdt_header[3]))
256 gdb.write("off_mem_rsvmap: 0x{:02X}\n".format(fdt_header[4]))
257 gdb.write("version: {}\n".format(fdt_header[5]))
258 gdb.write("last_comp_version: {}\n".format(fdt_header[6]))
260 inf = gdb.inferiors()[0]
266 except gdb.error:
267 raise gdb.GdbError("Could not open file to dump fdt")
272 gdb.write("Dumped fdt blob to " + filename + "\n")