[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debugging environment, gdbrc ?

The question is:

How can a Debian user utilize a combination of "apt-src", the "*-dbg"
library packages, and GDB in emacs to perform source-level debugging? 
Is there a HOWTO on this subject?

Without yet having really tried hard to solve the problem myself... 
I've begun thinking about how one would go about finding a problem in a
library used by a program.  The specific problem is a Gnome panel applet
that for some reason touches the disk on a regular pulse, and that keeps
the hard drive on my laptop from spinning down.  I'd like to launch it
in an environment where the -dbg libraries are used, then attach to it,
and be able to do some source-level debugging.  The thing is that it's
source is small, and I could not find the write in it's own source, so I
suspect it's in a Gnome library...

I have reported the bug to the author, since obviously the absolute best
and fastest debugging is done by those intimately familiar with the
source code in question.  But certainly there are plenty of times that's
not possible; you don't always want to wait for the upstream to fix
something, or you'd like to try your hand at fixing it yourself...

I know about using the LD_LIBRARY_PATH to get the -dbg libraries to
load, and how to run or attach to a process with GDB and in M-x gdb mode
in emacs.  I'm not sure how to get the source I grab with "apt-src" to
be associated with that process being debugged.

I think that this topic is deserving of a chapter or two in one of the
Debian Documentation Project books!  We should figure it out, and
perhaps create a package that makes it easy for J. Random Admin to
quickly apt-get install a setup that will allow in-situ debugging, as
well as report/patch creation.

<snip>A patch submission should contain a brief description / rational
for the patch, a pasted-in (not a diff of) GNU-Style ChangeLog entry,
followed by a -u diff...</snip>

Reply to: