GDB and debugging techniques
Eden Li
eden.li@asu.edu
Sat, 10 Feb 2001 08:14:14 -0700
I find it is just best to read `man gdb` and start debugging. GDB has
an intuitive interface after you learn it. You might run into problems
here and there while running in X, but it's still a very handy tool. I
tried DDD and wasn't impressed. GDB is a lot easier to navigate.
The basic idea of debugging for me is to step through code and view
variable values at certain lines of code to make sure that it's doing
what I want it to do. If it segfaults, just run a ``bt'' (backtrace)
to see which function is the culprit. It's a little more involved than
that, but once you start using GDB, you'll pick it up pronto.
Eden
On Wed, Feb 07, 2001 at 10:00:31AM -0700, Wacks, David wrote:
> I am training some new c coders (and other languages) on RH6.2 and FreeBSD.
> I use GDB as the primary debugging tool. Are there better GPL ones out
> there (or easier to learn)?
>
> Anyone know of good sites that teach debugging? One problem I am finding is
> that coders today do not know how to debug (this is an overgeneralization
> but one I stand by :) I say this in the same breath that ASP is MS way of
> keeping the VB coders employable. *DUCK*
>
> Anyway, I am trying to set consistent and thorough debugging methods and
> trying to train same. Anyone know of courses, classes, sites, etc to help?