Date: Sun, 23 Dec 2012 19:17:50 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: Alfred Perlstein <bright@mu.org> Cc: freebsd-hackers@freebsd.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: <CAGH67wS6Fc%2B8iu9w-ibJ=oN18y7oxjXOtzRq=MCLXspLjjKJXw@mail.gmail.com> In-Reply-To: <50D684D7.8050906@mu.org> References: <20121222164602.GB32022@sandvine.com> <1Tmb5f-000Jy5-CT@internal.tormail.org> <50D684D7.8050906@mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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). 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 :). Thanks! -Garrett PS Awesome solution for the ports issue :).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wS6Fc%2B8iu9w-ibJ=oN18y7oxjXOtzRq=MCLXspLjjKJXw>