% g++ -g -o main main.cpp
% gdb main
GNU gdb 6.3.50-20050815 (Apple version gdb-1700.2) (Thu May 19 20:52:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done
(gdb) b main
Breakpoint 1 at 0x100000d64: file main.c, line 5.
(gdb) r
Starting program: /Users/wind/main
Reading symbols for shared libraries ++......................... done
Breakpoint 1, main () at main.c:5
5 std::cout << "test !!" << std::endl;
(gdb)
Partager