我想通过串口ttyS0从我的64位suse机器调试MIPS linux驱动程序.使用的gdb通过LAN调试应用程序而不是kgdb over serial.我使用此页面和其他一些内容来启动调试,但没有最终结果.
我的内核使用以下设置编译:
CONFIG_MAGIC_SYSRQ=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
CONFIG_CMDLINE="kgdboc=ttyS0,115200"
Run Code Online (Sandbox Code Playgroud)
如果我运行gdb:
gdb vmlinux
(gdb) set remotebaud 115200
(gdb) set debug remote 1
(gdb) target remote /dev/ttyS0
Run Code Online (Sandbox Code Playgroud)
我可以观察以下输出:
输出(GDB_TERMINAL):
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Sending packet: $qSupported:qRelocInsn+#9a...Ack
Timeout in mid-packet, retrying
Timed out.
Timed out.
Ignoring packet error, continuing...
Packet qSupported (supported-packets) is supported
warning: unrecognized item "qSupported:qRelocIns" in "qSupported" response
Sending packet: $Hg0#df...Nak
Sending packet: $Hg0#df...Ack
Packet received: Hg0
Sending …Run Code Online (Sandbox Code Playgroud)