debugging on linux (was Re: Novell Survey)

Micah DesJardins micahdj at gmail.com
Fri Jan 27 11:51:06 MST 2006


>>Are they language/compiler specific?
Some are, and in those cases, you're realistically looking at C/C++/Java/Fortran

>>Can you step through lines of code? Can you get the current value of
variables?
I don't think you can have a "source" debugger of any sort without
those features.

>>Run code in an 'immediate window'with out altering code in your app?
Not to my knowledge

Some version or another of dbx comes with System V *nix flavors I
should specify that I was referring to the current version of dbx that
comes with Sun Studio 11 (which by the way is available for Linux for
free) which differs significantly.

mdb is a 'modular' debugger instead of a source debugger. It's a great
tool for some uses, like if you're trying to debug a debugger, or some
other low level tool or OS component or you're doing post-mortem on
some code you don't have symbol info for.

dtrace is Dynamic Tracing.  Right now it's Solaris only, but with the
Open Solaris project there's hope it will make it to Linux.  I was
going to try to explain it in my own words, but then I found this in
docs.sun.com:

DTrace helps you understand a software system by enabling you to
dynamically modify the operating system kernel and user processes to
record additional data that you specify at locations of interest,
called probes. A probe is a location or activity to which DTrace can
bind a request to perform a set of actions, like recording a stack
trace, a timestamp, or the argument to a function. Probes are like
programmable sensors scattered all over your Solaris system in
interesting places. If you want to figure out what's going on, you use
DTrace to program the appropriate sensors to record the information
that is of interest to you. Then, as each probe fires, DTrace gathers
the data from your probes and reports it back to you. If you don't
specify any actions for a probe, DTrace will just take note of each
time the probe fires.


--
TotalView and Purity are both expensive, but well written debugging
environments that are probably outside the scope of this conversation
and out of reach for most developers
_
Insight is a graphical front end to gdb and it might be just what
you're looking for, with the caveat that it's not necessarily
integrated into your IDE of choice.  Some key features:
Visual gdb Features / Capabilities:

    * View Stack
    * View Memory
    * View Registers
    * View Thread List
    * View Local Variables
    * View Function Browser
    * Set Watch on Expressions
    * Visually Set Breakpoints and Step
    * View Variable Values with Mouse Pointer
    * Command line and GUI options with built-in simulator
    * View Source Code and/or Assembly Code while Debugging

Google on gdb Insight if you want more info.

Good luck!

Micah


More information about the PLUG-discuss mailing list