Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: pth@belbone.be (Pierre Theate)
Subject: GDB and C++ problem
Date: 1999/09/14	[thread overview]
Message-ID: <7rllu8$dgr$1@news0.skynet.be> (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.



             reply	other threads:[~1999-09-14  4:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-14  4:00 Pierre Theate [this message]
1999-09-14  4:00 ` GDB and C++ problem 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
read-only archive

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