using namespace std;
cout << "b\n"; // line 7
cout << "a\n";
[D:\projects]g++ -g -O0 test.cpp
GNU gdb (rubenvb-4.7.2-release) 22.214.171.12420920-cvs
Copyright (C) 2012 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".
For bug reporting instructions, please see:
Reading symbols from D:\projects\a.exe...done.
(gdb) break test.cpp:7
Breakpoint 1 at 0x401948: file test.cpp, line 7.
Temporary breakpoint 2 at 0x40198a: file test.cpp, line 18.
Starting program: D:\projects\a.exe
[New Thread 124.0x188]
Temporary breakpoint 2, main () at test.cpp:18
Breakpoint 1, b () at test.cpp:7
7 cout << "b\n";
#0 b () at test.cpp:7
#1 0x0040197d in _fu1___ZSt4cout () at test.cpp:13
#2 0x0040198f in main () at test.cpp:18
so what is _fu1___ZSt4cout? yes its function 'a'. but why so strange name?
no such problem on linux and I guess with old mingw everything is fine too.
moreover sometimes there is no backtrace at all when it should be.
usually in more complex programs.
but gdb still works (stops on breakpoints and able to step by step debug)
Breakpoint 2, SkyDNS::Private::BackendImpl::adaptersChanged (this=0x43fa070)
#0 SkyDNS::Private::BackendImpl::adaptersChanged (
#1 0x0000000000000000 in ?? ()
Log in to post a comment.