Simon Geard wrote:
On Wed, 2008-06-04 at 07:20 -0700, Dan Nicholson wrote:
On Wed, Jun 4, 2008 at 5:35 AM, john q public <[EMAIL PROTECTED]>
wrote:
My REAL question is does anyone have advice on when its better to
comb the source versus chasing problems with the debugger?
I believe that Mr. Torvalds thinks debuggers are almost always the
wrong thing and a waste of time vs. just thinking about the source.
But everyone has their preference. I personally don't know gdb that
well, so it's usually is faster for me to debug problems by reading
the code.
Varies with the bug. If I already have a fairly good idea what kind of
problem it is, reading code is usually enough. More commonly though, I
just know that the output of some big block of code is incorrect, and
that's where a good debugger helps follow the inputs, making it easier
to spot when some intermediary value looks wrong. Sure, you can
theoretically do all the computations in your head. But really, if
you've got good tools, why not let them do the hard part for you?
Note - my coding is mostly in Java, using the excellent debugger built
into the Eclipse IDE. I don't have very much experience of using gdb...
Simon.
Very good suggestion! There is a plugin/environment for C/C++ for
eclipse as well. Eclipse has always looked cool to me I just don't do
any Java at this point so I left it on the back burner. But hooking
gcc/gdb to this extension sounds like something worth fooling with.
Thanks,
John
|
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page