Hello,

I noted that gdb 4.16, 4.18, and 20000314 all step into gcc 2.95.2 iostream
via a next.  Is this a bug or configuration problem with gcc or gdb?  We
are using AlphaServers running Digital UNIX 4.0D.

--------------------------------------
GNU gdb 20000314
Copyright 1998 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 "alphaev56-dec-osf4.0d"...
(gdb) break main
Breakpoint 1 at 0x12000b5d8: file created.cpp, line 23.
(gdb) run
Starting program: /home/u3/rjackson/cpp/a.out 

Constructor for obj 
Breakpoint 1, main () at created.cpp:23
23         cout << "\nStarting main";
(gdb) n
ostream::operator<< (this=0x14000eac0, s=0x140006c20 "")
    at /usr/local/src/gcc_2.95.2/gcc-2.95.2/libio/iostream.cc:816
816     {
(gdb) n
ostream::operator<< (this=0x1400003f8, s=0x140005568 "\nStarting main")
    at /usr/local/src/gcc_2.95.2/gcc-2.95.2/libio/iostream.cc:817
817       if (opfx())
(gdb) quit
The program is running.  Exit anyway? (y or n) y
--------------------------------------

On a Solaris system gdb next works as expected.

--------------------------------------
GNU gdb 19990712
Copyright 1998 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 "sparc-sun-solaris2.7"...
(gdb) break main
Breakpoint 1 at 0x12054: file created.cpp, line 20.
(gdb) run
Starting program: /home/rjackson/a.out 


Breakpoint 1, main () at created.cpp:20
20         cout << "\nStarting main";
(gdb) n
Constructor for obj 1 called
21         simpleObj obj2 (2);            // main local automatic object
(gdb) n
Starting main
Constructor for obj 2 called
23         somefunc();                   //  function call
(gdb) q
The program is running.  Exit anyway? (y or n) y
--------------------------------------


Regards,
Richard Jackson

Reply via email to