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

Re: RFC: Debugging libraries

Quoting Torsten Landschoff <t.landschoff@gmx.net>:
> On Mon, Apr 26, 1999 at 12:53:22PM -0600, Erik Andersen wrote on 
> debian-gtk-gnome:
> > Comparing the outputs from 'dpkg -L libc6-dbg' and 'dpkg -L libgtk1.2-dbg' 
> > is enlightening.  Seems that libc6-dbg gives us debugging shared libs, while
> > libgtk1.2-dbg gives us _static_ libraries.  Ugh.  That would explain the 
> > symptoms I'm seeing.  How does gdb know to use the libraries in 
> > /usr/lib/libc_debug when the -g flag is on?   Curious.  
> It is very annoying (at least for me) that every debugging library does
> something different. One package has shared debug libraries, another static
> libraries with debugging info and another one shared debug libraries with
> sources included.
> > How about this -- we have two packages, libgtk1.2, and libgtk1.2-dbg which
> > replace&conflict with one another.  The libgtk1.2 stuff is the normal
> > stripped, no checking enabled, fast runtime stuff, and libgtk1.2-dbg contains
> > the same libraries, but unstripped, with all extra checks turned on.  That
> > way, folks developing stuff would install libgtk1.2-dbg and could do their
> > dirty work without changing their Makefiles.  I but ugly, but it would
> > work...
> How about an addition to policy (or another document specifically for shared
> libraries) to document how we handle this?
> How can we handle it the best way, btw? I think the best thing to do would be
> to add a directory with debugging libraries to our filesystem (e.g.
> /usr/lib/debug) where the debugging libraries are located. This way everybody
> debugging a shared binary could just set LD_LIBRARY_PATH=/usr/lib/debug and
> would have every debugging information he likes.
> Only one problem left: How could we tell gdb where to search the source if the
> users installs the library source?
> Waiting for comments
>     Torsten

Ahh.  I like your idea!  So every library has a policy mandated libfoo-dbg 
which places its unstripped contents into /usr/lib/debug instead of /usr/lib, 
and then we perhaps have a wrapper script around gdb that does the 
LD_LIBRARY_PATH thing.  That would let us debug things properly, without 
rewriting every makefile in 12 kinds of strange ways for each library.  

Sounds good to me.

Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

Reply to: