🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by isaac Thu, 28 Mar 2002 06:58
wacked out stepping and watch info, C++
#2398
Author: isaac
Date: Thu, 28 Mar 2002 06:58
21 lines
2115 bytes
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
Re: wacked out stepping and watch info, C++
#2399
Author: Tauno Voipio
Date: Thu, 28 Mar 2002 12:14
32 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads