I wrote a simple test.ccas follows:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world" << endl;
return 0;
}
And I compiled with:
g++ -g test.cc -o test.o
I started gdband set a breakpoint on the line "Hello world":
$ gdb test.o
(gdb) b 7
(gdb) c
Then it gdbstops at the line "Hello world", but when I run
(gdb) s
He cannot enter the function cout. So my question is: how can I get into a function cout?
source
share