Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 通过gdb连接到远程gdbserver时出错_C++_Docker_Gdb_Fastcgi_Gdbserver - Fatal编程技术网

C++ 通过gdb连接到远程gdbserver时出错

C++ 通过gdb连接到远程gdbserver时出错,c++,docker,gdb,fastcgi,gdbserver,C++,Docker,Gdb,Fastcgi,Gdbserver,我有一个docker容器运行-p2000:2000,它在端口2000上运行一个gdbserver 当尝试通过gdb从主机连接时,我得到以下信息: (gdb) target remote localhost:2000 Remote debugging using localhost:2000 Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Ignor

我有一个docker容器运行-p2000:2000,它在端口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后面(<代码> GbServer:2000生成的FCGI- P 8000 -N/MyBoo2/<代码>)

主人

  • 操作系统:osx
  • gdb版本:8.0.1(与一起安装--与所有目标一起安装)
容器

  • 操作系统:ubuntu 14.04
  • gdb版本:7.7.1

任何帮助都将不胜感激。

我在运行qemu时遇到了同样的问题,我想将gdb与qemu内部gdbserver连接起来。 我做以下工作:

  • 在系统模式下运行qemu
  • 在qemu内运行gdbserver
  • 在主机上运行gdb,并在gdb内连接gdbservr
  • 软件版本如下:

    QEMU emulator version 2.12.92
    gdb 7.11.1
    GNU gdbserver (GDB) 7.8
    
    起初我无法连接gdbserver,错误是

    (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
    
    我通过在启动qemu时切换到高级内核来解决这个问题。从vmlinux-2.6.32-5-4kc-maltavmlinux-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
    
    然后错误被解决了,我可以连接gdbserver和gdb

    可能的解决方法还包括


      • 当我运行qemu时,我遇到了同样的问题,我想将gdb与qemu内部gdbserver连接起来。 我做以下工作:

      • 在系统模式下运行qemu
      • 在qemu内运行gdbserver
      • 在主机上运行gdb,并在gdb内连接gdbservr
      • 软件版本如下:

        QEMU emulator version 2.12.92
        gdb 7.11.1
        GNU gdbserver (GDB) 7.8
        
        起初我无法连接gdbserver,错误是

        (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
        
        我通过在启动qemu时切换到高级内核来解决这个问题。从vmlinux-2.6.32-5-4kc-maltavmlinux-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
        
        然后错误被解决了,我可以连接gdbserver和gdb

        可能的解决方法还包括