C++ Eclipse 无法执行 MI 命令 -target-select remote
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13678923/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse failed to execute MI command -target-select remote
提问by Shrouk Khan
Trying to setup remote gdb debugging in eclipse . when i try to debug i get:
尝试在 eclipse 中设置远程 gdb 调试。当我尝试调试时,我得到:
Error in final launch sequence
Failed to execute MI command: -target-select remote LOCALHOST:2345
Error message from debugger back end:
LOCALHOST:2345: Connection timed out.
LOCALHOST:2345: Connection timed out.
My gdb debugger is set up correctly
我的 gdb 调试器设置正确
/carambola/carambola/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gdb-linaro-7.2-2011.03-0/gdb/gdb
( executing this i can get gdb shell )
(执行这个我可以获得gdb shell)
any idea what i am doing wrong ? i think this is pretty elementary??
知道我做错了什么吗?我觉得这很初级??
回答by Shrouk Khan
this happens if the gdb client ( inside eclipse ) is not compiled for the same architecture as the gdb server. setting the correct gdb in eclipse debugging solved this issue
如果 gdb 客户端(在 eclipse 中)不是为与 gdb 服务器相同的体系结构编译的,就会发生这种情况。在eclipse调试中设置正确的gdb解决了这个问题
回答by user5587302
The connection is using localhost instead of the remote host. To correct, in eclipse go to
连接使用 localhost 而不是远程主机。要更正,请在日食中转到
Run->Debug Configurations..
运行->调试配置..
Here choose the Debugger tab, inside there are three additional tabs (Main, Shared Libraries, Connections). In connections you can give the proper ip for the remote machine.
在这里选择 Debugger 选项卡,里面有三个附加选项卡(主、共享库、连接)。在连接中,您可以为远程机器提供正确的 IP。
回答by Dennis Cronin
Switched to Debug view (upper right button), I then in the top menu bar towards the left I clicked the red box Terminate button. Then I was able to launch debug again.
切换到调试视图(右上角按钮),然后在顶部菜单栏中向左单击红色框终止按钮。然后我能够再次启动调试。
回答by Shaz
I tried changing my workspace to the main folder where the project is placed and checked if my ST Link device was scanned(debug configurations)and checked if under run configurations,under main,the .elf file was selected under c/c++: Then my code started working. Hope this helps
我尝试将我的工作区更改为放置项目的主文件夹,并检查我的 ST Link 设备是否已扫描(调试配置)并检查是否在运行配置下,在 main 下,在 c/c++ 下选择了 .elf 文件:然后我的代码开始工作。希望这可以帮助
回答by chandan mishra
This issue is created because of two reason:
创建此问题的原因有两个:
- if break point is enable so go to run and skip breakpoint
- if debug device is not set correctly so go to
Debug
configure as and check forDebugger
option is filled correctly.
- 如果启用断点,则运行并跳过断点
- 如果调试设备设置不正确,请转到
Debug
配置为并检查Debugger
选项是否正确填写。