0
我最近开始在DEV C++中编程,并且遇到了一个问题,那就是搜索Googleshere并没有证明有帮助。GDB在DEV C++在cout上停滞
在下面的代码中,当GDB遇到第5行时,“挂起”,std::cout << "Hello" << std::endl;
。
#include <iostream>
int main()
{
int tree = 9;
std::cout << "Hello" << std::endl;
tree = 10;
return 0;
}
程序编译和运行得很好,但通过它步进总时被困在这里既不“下一行”或“继续”似乎工作。
下面是从GDB窗口中的一些输出:
Starting program: C:\XXX\XXX\XXX\XXX\breakGDB.exe
[New Thread 7300.0x2028]
->->new-thread
[New Thread 7300.0x2638]
->->new-thread
->->starting
->->breakpoints-invalid
->->frames-invalid
->->breakpoint 1
Breakpoint 1,
->->frame-begin 0 0x40153d
->->frame-function-name
main
->->frame-args
()
->->frame-source-begin
at
->->frame-source-file
hello.cpp
->->frame-source-file-end
:
->->frame-source-line
5
->->frame-source-end
->->source C:\XXX\XXX\XXX\XXX\hello.cpp:5:38:beg:0x40153d
->->frame-end
->->stopped
->->pre-prompt
(gdb)
->->prompt
->->post-prompt
->->frames-invalid
->->starting
->->frame-begin 0 0x44d2f0
->->frame-address
0x000000000044d2f0
->->frame-address-end
in
->->frame-function-name
std::ostream::operator<<(std::ostream& (*)(std::ostream&))
->->frame-args
()
->->frame-end
->->stopped
->->pre-prompt
(gdb)
->->prompt
->->post-prompt
Single stepping until exit from function _ZNSolsEPFRSoS_E,
which has no line number information.
->->frames-invalid
->->starting
->->frame-begin 0 0x46cf10
->->frame-address
0x000000000046cf10
->->frame-address-end
in
->->frame-function-name
std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
->->frame-args
()
->->frame-end
->->stopped
->->pre-prompt
(gdb)
->->prompt
我是很新的GDB。这是GDB的功能吗?我的设置有误吗?这里发生了什么?
我已经把我的手指交叉了,这不是我的一些愚蠢的错误。