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

How to compile for debugging (APT)?



Does anyone have any suggestions for how to compile a debian package,
specifically apt, for debugging?  I got curious about some odd apt-get
behavior (posted here previously) and wanted to try to track it down.
Easier said than done!

I think the problem is that I'm linking with my main libapt-pkg.so,
which doesn't have any debug info.  I have tried setting -ggdb in
appropriate places and turning on static linking, but it doesn't seem
to have taken (judging from what happens in debug and the output of
ldd). 

I may be missing some general feature of GNU or debian packages, or it
may be peculiar to apt.  apt has a somewhat non-standard build
architecture in place.

I did apt-get source and then ./configure, make at the top level (the
build tree, or a good part of it, is replicated in
debian/cvs-build--I'm not messing with that).  I'm not trying to build
a deb, and my output files are ending up under the source tree (which
is fine).  I've steadily modified the build files, first with -ggdb
and then with static makes.  I've done make cleans in between.

Aside from apt, I'd like to know if there are some general knobs for
turning debugging on with most packages.

P.S. I would have posted this to the deity (aka apt) list, but it is
apparently limited to apt developers.  I'm not one, though conceivably
I might have a patch at the end of this to get apt to explain itself
better.  I have turned on the documented Debug conf file options.



Reply to: