[PLUG-Devel] g++ -g and included files

Micah DesJardins micahdj at gmail.com
Thu May 14 09:41:50 MST 2009


Jerry,

I cc'd you because I wasn't sure if you were subscribed to the
plug-devel list but I figured somehow this was a better place to
discuss debugging.


try using -ggdb instead of -g

and set a break on the function you want to step through instead of step over.

ex:

break myfile.cpp:mymethod

or

break myfile.cpp:12

It may give you the results you are looking for. If not, you may want to RTFM

http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Debugging-Options.html#Debugging-Options

As far as the Distributed vs Centralized, there are reasons for both
and for smaller teams, I think SVN works just fine. For me DVCS seems
like overkill for most things. If you were running a large project,
with contributers spanning the globe, sure.  If you have a small team
banging out closed source code in an office together, it's like using
an elephant suspended from a crane as a flyswatter.

On Thu, May 14, 2009 at 7:13 AM, Ted Gould <ted at gould.cx> wrote:
> On Thu, 2009-05-14 at 05:45 -0700, Jerry Davis wrote:
>> 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.
>
> Off topic, but if you're switching version control systems right now I
> wouldn't be switching to SVN.  Basically it's a generation old in
> version control thinking.  I'd be switching to something more modern
> like a DVCS.
>
>> 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?
>
> Everything needs to be compiled with -g to get full symbols.  But
> probably your issue is just the command you're using.  In gdb you need
> to use the "next" command to step into a function.  Honestly, I'd
> recommend using one of the graphical debuggers like ddd as it would help
> with the gdb command set.  Also, I believe that Eclipse can tie into
> gdb, but I haven't used that.
>
>                --Ted
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


More information about the PLUG-devel mailing list