Subject: gdb and c++
To: None <current-users@NetBSD.ORG>
From: Andrew Brown <twofsonet@graffiti.com>
List: current-users
Date: 02/14/1998 15:21:59
how smart is the newest (netbsd "bundled") version of gdb?  i'm having
a terrible time trying to debug a c++ program i'm writing.  it doesn't
seem to "know" about class local variables (for lack of a better
term?) and occasionally seems to be skipping (as far as i can tell) a
stack frame.  eg:

   (gdb) bt
   #0  0x100cf006 in bcopy ()
   #1  0x27f2 in User::user_input (this=0x37065) at user.cc:290
   #2  0x13257 in main (ac=2, av=0xf7bfdadc) at main.cc:295
   Current language:  auto; currently c
   (gdb) up
   #1  0x27f2 in User::user_input (this=0x37065) at user.cc:290
   290         while (!(u_flags&U_DONE) && u_inp->bufgets(line,IOBLOCK)) {
   Current language:  auto; currently c++

i see it switching from c to c++ (makes sense) but User::user_input
doesn't call bcopy.  it calls Buffer::bufgets which, in turn, calls
bcopy.  and bufgets is not an inline method, it's defined in another
.cc file.  help?

i'm using a somewhat old version of netbsd (1.2/i386) and gdb (4.11)
but i'm wondering how much i would win by moving to 1.3 (which i plan
to do anyway rather soon now) sooner as opposed to later...

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."