Article View: gnu.gdb.bug
Article #2399Re: wacked out stepping and watch info, C++
From: Tauno Voipio
Date: Thu, 28 Mar 2002 12:14
Date: Thu, 28 Mar 2002 12:14
32 lines
2582 bytes
2582 bytes
"isaac" <isaacjunk@hotmail.com> wrote in message news:8c3264f8.0203272258.1d790558@posting.google.com... > I have a small program in C++. When I try to run it in GDB, it seems > to step through the program OK, but it sometimes shows me the wrong > location in the source files. Also, it cannot show me variables that > I know must be visible ( like argc when I'm in main() ). > > I'm running gdb 4.14 + gcc 2.95.2 on Solaris 2.7. > > The project has just two small source files: Vector.cc and > extendGeneModels.cc ( + .h files ). I'm compiling with these options: > (note I'm using mysql ) > gcc -g -I/usr/common/usg/gnu/include -DUSE_MYSQL > -I/opt/local/mysql/include -I/usr/include extendGeneModels.cc > Vector.cc -o extendGeneModels -lnsl -lm -ldl -lsocket > -L/usr/common/usg/gnu/lib -lgdbm -lpthread -L/usr/openwin/lib -lX11 > -L/opt/local/mysql/lib -lmysqlclient > > Note that these options worked fine with gdb on all previous c > programs ( dozens of large ones ) written on this platform: this is my > first attempt to use C++ and gdb on this platform. Any ideas? > > Isaac Please re-compile without optimisation, the optimiser re-organises often the program flow in peculiar ways. HTH Tauno Voipio tauno voipio @ iki fi
Technical Details
Message-ID:
<6PDo8.168$qn.22139@read2.inet.fi>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mailReferences:
<8c3264f8.0203272258.1d790558@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,5ebf9e787f5422ab
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-03-28 04:16:23 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Thu, 28 Mar 2002 12:16:13 GMT
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail
From: "Tauno Voipio" <tauno.voipio@iki.fi.SPAMBAIT_REMOVE.invalid>
References: <8c3264f8.0203272258.1d790558@posting.google.com>
Subject: Re: wacked out stepping and watch info, C++
MIME-Version: 1.0
Content-Type: text/plain;
charset="GB2312"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <6PDo8.168$qn.22139@read2.inet.fi>
Date: Thu, 28 Mar 2002 12:14:58 GMT
NNTP-Posting-Host: 62.71.251.155
X-Trace: read2.inet.fi 1017317698 62.71.251.155 (Thu, 28 Mar 2002 14:14:58 EET)
NNTP-Posting-Date: Thu, 28 Mar 2002 14:14:58 EET
Organization: Sonera corp Internet services
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Sender: bug-gdb-request@mail.gnu.org
Lines: 33