Eclipse - 启动命令时出错:gdb --version
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38591704/
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 -Error while launching command: gdb --version
提问by Krishna Mohan
I am using Eclipse on a Windows system (64-bit) for C++ code and the compiler is GCC/G++. I have created a .exe and in the end it is showing as amd64/le, and I am not able to debug. When I am trying to debug, I am getting the error as
我在 Windows 系统(64 位)上使用 Eclipse 来处理 C++ 代码,编译器是 GCC/G++。我创建了一个 .exe,最后它显示为 amd64/le,我无法调试。当我尝试调试时,我收到错误消息
Error while launching command: gdb --version CreateProcess error=2, The system cannot find the file specified
启动命令时出错:gdb --version CreateProcess error=2,系统找不到指定的文件
- Can you please let me know what is that amd64/le?
- What is need to be done to debug?
- 你能告诉我 amd64/le 是什么吗?
- 需要做什么来调试?
回答by werber bang
You can have a look at this link. It helped me solve this problem just now,
你可以看看这个链接。刚刚帮我解决了这个问题,
The steps to follow are:
要遵循的步骤是:
- Select Debug Configurations
- and click the Debugger tab
- now choose a GDB debugger by clicking Browseand selecting gdb.exe from the "bin" folder of your MinGW folder
- 选择调试配置
- 然后单击调试器选项卡
- 现在通过单击浏览并从 MinGW 文件夹的“bin”文件夹中选择 gdb.exe 来选择 GDB 调试器
(Mostly it should be in something like C:\Min_GW
).
(大多数情况下它应该是类似的C:\Min_GW
)。
回答by dbrank0
AMD64/LE shows architecture / endianness. In your case architecture is X86-64 alias AMD64and endiannessis little(fixed on x86[64]).
AMD64/LE 显示架构/字节序。在你的情况架构是X86-64别名AMD64和字节序是小(固定在x86 [64])。
As for your error message. It is possible that you did not install GDBwhen you installed your toolchain. Verify that you have it installed.
至于你的错误信息。安装工具链时可能没有安装GDB。验证您是否已安装它。
It is also possible that you have bumped into this bug. Workaround is to check your path and remove any instances of ;; (like for example in c:\;;d:\, which is valid for most uses, but eclipse/cdt has issues with it).
您也有可能遇到了这个错误。解决方法是检查您的路径并删除任何 ;; (例如在 c:\;;d:\ 中,这对大多数用途都有效,但 eclipse/cdt 有问题)。