- 论坛徽章:
- 95
|
原帖由 yjmwolf 于 2007-4-29 20:54 发表于 3楼
这是c++ 标准库里面的例子
gdb错误不止出现在这个程序中,几乎所有的程序gdb调试都会出现这个问题
而且是g++ -g -o.....................编译的
// cont/mapl.cpp
#include <iostream>
#include ...
我试验了一下,没什么问题。
$ g++ -g t1.cpp
lee@debian:/tmp
$ gdb ./a.out
GNU gdb 6.3-debian
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 "i386-linux"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) b 3
Breakpoint 1 at 0x8048f78: file t1.cpp, line 3.
(gdb) r
Starting program: /tmp/a.out
Breakpoint 1, main () at t1.cpp:6
6 {
系统环境:
gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13sarge1)
Linux debian 2.6.7-1-686 #1 Thu Jul 8 05:36:53 EDT 2004 i686 GNU/Linux |
|