Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* GDB and C++ problem
@ 1999-09-14  4:00 Pierre Theate
  1999-09-14  4:00 ` Tom Kacvinsky
  0 siblings, 1 reply; 8+ messages in thread
From: Pierre Theate @ 1999-09-14  4:00 UTC (permalink / raw)


Hi wizards,

I can use gdb with C program but have some trouble with C++.
For example, see folowing gdb session :

> more pth.cpp

1 #include <stream.h>
2
3 void
4 main (void)
5 {
6       int i = 1;
7
8       i++;
9       cout << "i = " << i << endl;
10 }

> g++ -g pth.cpp

> gdb a.out
GNU gdb 4.17
..
(gdb) b 6
Breakpoint 1 at 0x12000a6e8: file pth.cpp, line 6.
(gdb) r
Starting program: /shared/home/rtrp/tmp/a.out

Breakpoint 1, main () at pth.cpp:6
6               int i = 1;
(gdb) n
8               i++;
(gdb) n
9               cout << "i = " << i << endl;
(gdb) print i
$1 = 2
(gdb) n
operator::operator<< (this=0x14002e600, s=0x0) at iostream.cc:765
765             {
(gdb)

I use 'next' command but gdb step in cout operator source code !
Do you have the same behaviour on your system ?
My system is Digital OSF1 V4.0 878 alpha.

Any help would be greatly apreciated.

Pierre.



--------------------------------------------

Pierre Theate
Belgacom, Multimedia & Infohighways division
e-mail: pth@belbone.be
phone: +32 2 202.44.45.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-09-27  4:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-14  4:00 GDB and C++ problem Pierre Theate
1999-09-14  4:00 ` Tom Kacvinsky
1999-09-20  4:00   ` Thomas Riechen
1999-09-20  4:00     ` Tom Kacvinsky
1999-09-20  4:00       ` Thomas Riechen
1999-09-23  4:00   ` Pierre Theate
1999-09-23  4:00     ` Tom Kacvinsky
1999-09-27  4:00       ` Pierre Theate

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox