简体   繁体   English

使用GDB进行Eclipse C / C ++调试

[英]Eclipse C/C++ Debugging with GDB

I am trying to debug an executable using the Eclipse C/C++ Attach to Application functionality for a compiled executable. 我正在尝试使用Eclipse C / C ++附加到应用程序的功能调试已编译的可执行文件的可执行文件。 I have imported a new C/C++ Executable project, selected the appropriate executable and configured the debugger to use a msys/mingw version of gdb. 我已经导入了一个新的C / C ++可执行项目,选择了适当的可执行文件,并将调试器配置为使用gdb的msys / mingw版本。

When I try to run the debugger I get console output for gdb 当我尝试运行调试器时,我得到了gdb的控制台输出

GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

But then an error window pops up saying that gdb.exe has stopped working 但是随后弹出一个错误窗口, 提示gdb.exe停止工作

What might I have misconfigured that is causing this? 我可能配置错误是什么原因导致的?

This was caused by the gdb.exe version. 这是由gdb.exe版本引起的。 I installed version 7.6.1-1 using MinGW-get instead of using Msys and the 7.6.1-1 version worked with eclipse. 我使用MinGW-get而不是Msys安装了7.6.1-1版,而7.6.1-1版使用了eclipse。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM