"isaac" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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


_______________________________________________
Bug-gdb mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gdb

Reply via email to