g++ -g and included files
Jerry Davis
jdawgaz at cox.net
Thu May 14 05:45:29 MST 2009
and now for something completely off topic ... other than rules for posting and
such.
I am just now having to learn c++ : I haven't done any C work since the
middle 80's. I am being forced to move from Rational clearcase and clearquest
to svn and teamtrack. TeamTrack is UGLY, don't get me started. But suffice it
to say, that the teamtrack API is written in C++. At least this part runs on
linux.
I have the following situation:
I have a source file, which has a bunch of #includes which are .h files of the
other classes used. I have full source. IOW, I can see in the source/ directory
every .h and .C file of all the #includes.
I use g++ to compile, and I compile with -g to make it debuggable with gdb. I
am also new to gdb, but am learning.
I hope you are with me so far.
In my current source file, I instantiate an object of a class from another
source file, which is #included in my current source file. When I use gdb, I
can step into my current sources' functions and step through every line and
print out variables etc. -- everything you would expect to do in a debugger,
BUT, when I get to the method call of the other class object, I can do nothing
but step OVER it.
How do I compile it such that I can step INTO the other objects' method? and
then step line by line in it? or do I have that capability already, and need to
use some other command in gdb that I don't know about?
I hope this is clear.
--
Hobbit Name: Pimpernel Loamsdown
Registered Linux User: 275424
K7AZJ
This email's Fortune:
Ideas don't stay in some minds very long because they don't
like solitary confinement.
More information about the PLUG-discuss
mailing list