[PATCH] Add WITH_DEBUG_FILES knob to enable separate debug files

Garrett Cooper yanegomi at gmail.com
Sun Dec 23 21:47:14 UTC 2012


On Sun, Dec 23, 2012 at 8:26 AM, Ed Maste <emaste at freebsd.org> wrote:
> On 22 December 2012 23:13, Alfred Perlstein <bright at mu.org> wrote:
>> 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.
>
> Note that just moving ports debug data to /usr/local/lib/debug/...
> won't work since GDB won't search there.  We could teach it to search
> a list of paths and include /usr/local/lib/debug and /usr/lib/debug,
> or perhaps a symlink under /usr/local/lib.
>
> We could also use a .debug subdirectory for ports and other users of
> bsd.lib.mk - so for example /usr/local/lib/libfoo.so would have debug
> info in /usr/local/lib/.debug/libfoo.so.debug.

    Crazy idea: why not just provide the user with an example .gdbinit
that does these things? For Isilon it makes more sense to tack on
additional paths (which we already do in our internal directions), and
others potentially are doing similar *shrugs*, so as long as the
example makes sense, I'd stick with it.
    I would probably setup things in such a way that the old default
is kept though because I'm sure that there's someone out there that's
using it (even it it's not *the best* default per how we prefix things
in ports).
Thanks!
-Garrett


More information about the freebsd-hackers mailing list