Userland debug symbols directory

Mark Johnston markjdb at gmail.com
Sat Nov 6 23:21:18 UTC 2010


On Sat, Nov 06, 2010 at 02:04:20PM -0400, Ed Maste wrote:
> On Sat, Nov 06, 2010 at 07:56:03PM +0200, Kostik Belousov wrote:
> 
> > On Sat, Nov 06, 2010 at 01:36:20PM -0400, Ed Maste wrote:
> > > On Fri, Nov 05, 2010 at 10:45:19PM +0200, Gleb Kurtsou wrote:
> > > 
> > > > I like the idea a lot, but why not to leave symbol files in /usr/obj,
> > > 
> > > The application where this is most useful (and why we implemented it
> > > originally) is the case where /usr/obj isn't available - for instance,
> > > a binary installation other than where the source tree was built.  If
> > > you're going to keep /usr/obj around anyway then you can get most of
> > > the benefit by just keeping the unstripped binaries / libs in there,
> > > no?
> > Not that easy, since you have to arrange to use libraries from obj/,
> > by LD_LIBRARY_PATH etc.
> >
> > I fully support the work to install symbol files, and it should go
> > into /usr, might be /usr/lib/debug. Possibly, some change to gdb (config)
> > is required.
> 
> 
> Yeah, I just mean that using LD_LIBRARY_PATH or whatever is still a lot
> easier than realizing you don't have the debug info at all, and trying
> to rebuild an identical binary or library with debug.
> 
> I definitely want the changes to build and install the symbol files in
> the FreeBSD tree.  I don't have a huge concern over the exact path we
> pick.
> 
> -Ed

FWIW, the default path is #defined in gnu/usr.bin/gdb/arch/*/config.h as
DEBUGDIR. I suppose that could be changed on a system-by-system basis
using a global configuration file, but apparently such a file needs to
be defined at compile time:

http://sourceware.org/gdb/onlinedocs/gdb/System_002dwide-configuration.html#System_002dwide-configuration

I don't have a strong opinion on the location, /usr/lib/debug seems fine
to me.

-Mark


More information about the freebsd-hackers mailing list