Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2012 23:42:00 -0500
From:      Mark Johnston <markjdb@gmail.com>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Alfred Perlstein <bright@mu.org>, Ed Maste <emaste@freebsd.org>, Jan Beich <jbeich@tormail.org>
Subject:   Re: [PATCH] Add WITH_DEBUG_FILES knob to enable separate debug files
Message-ID:  <CAMw1wOzQtDGsihneV=kjPAbd_cwHue-vwceYMGb0RMbMBrD2SA@mail.gmail.com>
In-Reply-To: <CAGH67wS6Fc%2B8iu9w-ibJ=oN18y7oxjXOtzRq=MCLXspLjjKJXw@mail.gmail.com>
References:  <20121222164602.GB32022@sandvine.com> <1Tmb5f-000Jy5-CT@internal.tormail.org> <50D684D7.8050906@mu.org> <CAGH67wS6Fc%2B8iu9w-ibJ=oN18y7oxjXOtzRq=MCLXspLjjKJXw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 23, 2012 10:18 PM, "Garrett Cooper" <yanegomi@gmail.com> wrote:
>
> On Sat, Dec 22, 2012 at 8:13 PM, Alfred Perlstein <bright@mu.org> wrote:
> > On 12/22/12 6:14 PM, Jan Beich wrote:
> >>
> >> Ed Maste <emaste@freebsd.org> writes:
> >>
> >>> When this knob is set standalone debug files for shared objects are
> >>> built and installed in /usr/lib/debug/<so pathname>.debug.  GDB
> >>> searches this path for debug data.
> >>
> >> [...]
> >> What about ports? They are not allowed to install outside of PREFIX.
> >>
> >>    $ cd multimedia/cuse4bsd-kmod
> >>    $ make install PREFIX=/tmp/aaa PKG_DBDIR=/tmp/pkg WITH_DEBUG=
> >>    [...]
> >>    install -C -o root -g wheel -m 444   libcuse4bsd.a /tmp/aaa/lib
> >>    install -s -o root -g wheel -m 444     libcuse4bsd.so.1 /tmp/aaa/lib
> >>    install -o root -g wheel -m 444    libcuse4bsd.so.1.debug
> >> /usr/lib/debug/tmp/aaa/lib
> >>    install: /usr/lib/debug/tmp/aaa/lib: No such file or directory
> >>    *** [_libinstall] Error code 71
> >
> > I have a patch for this.  I am building world to see what happens, if
you
> > want to try it, or comment on it, please let me know.
> >
> > Changes are:
> >       base DEBUGDIR on LIBDIR for ports
> >       create intermediate directories for debug objs.
>
>     One thing about this (and the original patch) that may or may not
> make sense is that DEBUGDIR should be undefined and passed in via
> CFLAGS in the Makefile (reason being is that it would reduce
> duplication IMO and it's less duplicated magic juju hanging around
> some gdb header files).

FWIW, newer versions of gdb have done this.

>     Another thing that might be a good idea is that the changes in
> bsd.lib.mk diverge from standard expectations for the file extension
> (.symbols -> .debug), so at the very least this should be documented.
>     Finally, what about debug symbols for programs (bsd.prog.mk)? I
> assume that's coming soon, but I figured I should ask :).

I have an extension of Ed's patch which handles bsd.prog.mk at
http://people.freebsd.org/~markj/patches/debug_symbols/debug_symbols_full.patch

> Thanks!
> -Garrett
>
> PS Awesome solution for the ports issue :).
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMw1wOzQtDGsihneV=kjPAbd_cwHue-vwceYMGb0RMbMBrD2SA>