[PATCH] Add WITH_DEBUG_FILES knob to enable separate debug files
Alfred Perlstein
bright at mu.org
Sun Dec 23 22:59:40 UTC 2012
On 12/23/12 1:47 PM, Garrett Cooper wrote:
> 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).
It's not a crazy idea, it's pretty good, however what it really turns
into is another "not out of the box working easy" thing.
Stuff like this should "just work". And if it doesn't, then we need to
think harder about it.
-Alfred
More information about the freebsd-hackers
mailing list