[ramana@numenor acolon]$ g++ --version g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [ramana@numenor acolon]$ /gccbuild/gdbfresh/intelbuildhere/gdb/gdb --version GNU gdb 2004-01-28-cvs 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 "i686-pc-linux-gnu". [ramana@numenor acolon]$ /gccbuild/gdbfresh/intelbuildhere/gdb/gdb a.out GNU gdb 2004-01-28-cvs 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) b A::A() Breakpoint 1 at 0x804855d: file fail.cpp, line 18. (gdb) r Starting program: /home/ramana/comedi/unipune/acolon/a.out Breakpoint 1, A (this=0x80497f8) at fail.cpp:19 19 bFlag = false; // Here I want to place a breakpoint (gdb) n 20 num = 9; (gdb) n 21 } (gdb) n main (argc=1, argv=0xbfffe9a4) at fail.cpp:14 14 return 0; (gdb) n 15 } (gdb) n 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6 (gdb) c Continuing. Program exited normally. (gdb) q [ramana@numenor acolon]$ cat fail.cpp // File simpletest.cpp: g++ -g3 simpletest.cpp class A { public: A(); private: bool bFlag; int num; }; int main(int argc, char *argv[]) { A* pA = new A; return 0; } A::A() { bFlag = false; // Here I want to place a breakpoint num = 9; }