我有一个非常简单的C程序:

#include <iostream>
using namespace std;

int main(){
  int i = 0;
  cout << "Hello world!" << endl;
  i++;
}

当我用debug编译链接时:

---jGRASP exec: C:\MinGW\bin\g++.exe -g -o hello-world-debug.exe hello-world-debug.cpp

我收到成功消息并看到 hello-world-debug.exe 输出文件 . 但是,当我尝试使用以下方法调试它时:

----jGRASP exec: C:\MinGW\bin\gdb.exe --args C:\Users\ituser\Documents\hello-world-debug.exe

我得到以下内容:

GNU gdb(GDB)7.6.1版权所有(C)2013 Free Software Foundation,Inc . 许可证GPLv3:GNU GPL版本3或更高版本http://gnu.org/licenses/gpl.html这是免费软件:您是免费的改变并重新分配它 . 在法律允许的范围内,不提供任何担保 . 输入“show copying”和“show warranty”了解详细信息 . 此GDB配置为“mingw32” . 有关错误报告说明,请参阅:http://www.gnu.org/software/gdb/bugs / ...从C:\ Users \ ituser \ Documents \ hello-world-debug.exe读取符号...完成 . (gdb)在stdin上检测到的fd 0错误检测到异常条件---- jGRASP:操作完成 .

这是Windows 7.任何想法?