- 论坛徽章:
- 0
|
@debian:~$ gdb ./a.out
GNU gdb 6.8-debian
Copyright (C) 2008 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 "i486-linux-gnu"...
(gdb) break cout.cc : 8
Breakpoint 1 at 0x80485ea: file cout.cc, line 8.
(gdb) run
Starting program: /home/smith/a.out
Breakpoint 1, func () at cout.cc:8
8 cout<<"hello\n";
(gdb) n
hello
9 return 1;
(gdb) q
The program is running. Exit anyway? (y or n) y
你在你的hello后面加了个换行。 |
|