在Linux设备上调试时出错:gdbserver [英] Error debugging on Linux device: gdbserver

查看:853
本文介绍了在Linux设备上调试时出错:gdbserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2017在linux上编译和调试我的跨平台C应用程序。使用我的Raspberry Pi它运行得很好,但现在我尝试在yocto系统上调试它。编译工作,但如果我想调试我收到以下消息:

I am using VS2017 to compile and debug my cross platform C application on linux. With my Raspberry Pi it is working perfectly, but now I tryed it to debug it on a yocto system. Compilation works, but if I want to debug I am getting following message:

启动gdbserver失败,这是意外的,并指示shell不兼容或损坏。 shell上使用的示例命令:"echo 1; gdbserver的;回声2"。我们预计"1"。

Starting gdbserver failed, this is unexpected and indicative of an incompatible or broken shell. Example command used on the shell: "echo 1; gdbserver; echo 2". We expected "1".

在我的远程机器上安装了gdbserver 7.10.1。

On my remote machine gdbserver 7.10.1 is installed.

推荐答案

嗨Thomas Hepp,

Hi Thomas Hepp,

根据错误消息,问题出在gdbserver上。请在yocto系统上重新安装它,以确保gdbserver已经安装并且已经启动。

According to the error message, the problem is on the gdbserver. Please reinstall it on the yocto system to make sure the gdbserver has been installed and it has been started.

据我所知,如果程序执行成功,gdbserver也退出了。因此,如果您远程调试多个程序,则需要使用以下命令,该命令将不会每次使用不同的程序名称启动gdbserver。

And as far as I know, if the program executed successfully, the gdbserver also got exited. So if you are debuging multiple programs remotely, you need to use following command which will not start the gdbserver every time with different program names.


gdbserver --multi localhost:2000
侦听端口2000
gdbserver --multi localhost:2000 Listening on port 2000

此外,还有其他社区在Visual Studio中遇到类似问题2017年使用远程GDB调试器进行调试时。请投票并为此反馈添加评论。

In addition, there has other communities who has the similar problem in Visual Studio 2017 when debugging with remote GDB Debugger. Please vote and add comments for this feedback.

https://developercommunity.visualstudio.com/content/problem/38397/problem-with-remote-gdb-debugger.html

最诚挚的问候,

Weiwei

Best Regards,
Weiwei


这篇关于在Linux设备上调试时出错:gdbserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆