我有一个运行-p 2000:2000的docker容器,它在端口2000上运行gdbserver。
尝试通过gdb从主机连接时,我得到以下结果:
(gdb) target remote localhost:2000
Remote debugging using localhost:2000
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
在 docker 容器中运行的应用程序是用 C++ 编写的,在 fcgi ( gdbserver :2000 spawn-fcgi -p 8000 -n ./myBinary
( 后面
主机
- 操作系统: osx
- GDB 版本:8.0.1(随 --with-all-target 一起安装(
容器
- 操作系统: ubuntu 14.04
- GDB 版本:7.7.1
任何帮助将不胜感激。
当我运行我的 qemu 时,我遇到了同样的问题,我想将 GDB 与 qemu 内部 gdbserver 连接起来。我做以下工作:
- 在系统模式下运行 QEMU。
- 在 QEMU 中运行 GDB服务器
- 在主机中运行 GDB,并在 GDB 中连接 gdbservr。
软件版本如下:
QEMU emulator version 2.12.92
gdb 7.11.1
GNU gdbserver (GDB) 7.8
起初我无法连接GDB服务器,错误是
(gdb) target remote 192.168.240.136:1234
Remote debugging using 192.168.240.136:1234
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
从vmlinux-2.6.32-5-4kc-Malta到vmlinux-3.2.0-4-4kc-Malta,然后命令start QEMU更改为以下内容:
sudo qemu-system-mips -M malta
-kernel vmlinux-3.2.0-4-4kc-malta
-hda debian_squeeze_mips_standard.qcow2
-append "root=/dev/sda1 console=tty0"
-net nic,macaddr=00:16:3e:00:01:01
-net tap
-nographic
然后错误解决了,我可以将GDB服务器与GDB连接。
可能的解决方法还包括
- 砰设置冲突
- 串行设置错误