In <[EMAIL PROTECTED]>, Dan Nelson <[EMAIL PROTECTED]> typed: > In the last episode (Mar 26), taxman said: > > On Wednesday 26 March 2003 03:11 pm, Dan Nelson wrote: > > > If it's your program, recompile and link with the -g commandline > > > switch added. If it's a base FreeBSD program (or port), edit the > > > Makefile and add a line reading "DEBUG_FLAGS=-g" (this will compile > > > with -g and also no strip the debugging symbols when the binary > > > gets installed). > > Does this work for the kernel? I'd read that the kernel strips > > symbols anyway. If i put makeoptions DEBUG=-g in my kernel config > > (as shown in LINT) will I still get the symbols? Thats for 4.x, what > > about 5.0 is that different? > It still works in 5.0. What ends up happenning is a debugging kernel > gets built as kernel.debug, but the stripped version is still installed > into /boot/kernel/ (most likely to conserve space on /). When you > panic and coredump, copy kernel.debug out of the source tree into > /var/crash and use that to debug.
That's the difficult way to do this. You can debug the core and kernel dumps in /sys/crash, and use the gdb symbol-file command to load the symbols from kernel.debug. This is all documented in the kernel debugging section of the developer's handbook link at <URL: http://www.freebsd.org/docs.html >. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
