cvs commit: src/sys/conf

David O'Brien obrien at
Tue Sep 13 10:56:17 PDT 2005

On Tue, Sep 13, 2005 at 11:58:48AM +0300, Ruslan Ermilov wrote:
> To address all of this, I suggest to revert to rev. 1.83
> and just make INSTALL_DEBUG the default in HEAD when DEBUG is also
> set.  Should this be also true for modules, I'm not sure.
> The only change in behavior would be that installkernel.debug now
> installs *both* normal and debug versions, while previously it only
> installed debug versions.

1. We can still have the confusion of how to provide a usable traceback.
The poster will have to know to kgdb kernel.debug vs. kernel.
2. Why install a file that is a complete copy of another and then extra
needed information?  Instead just install the fuller copy.  Those
suffering from small / partitions will have even more pressure installing
an extra 6.7MB.

Please remember the purpose of this is to get better bug reports on
-CURRENT.  While still trying to strike a balance with disk space and

Here is a patch that separates out the symbols into its own file and
installs them beside the now stripped kernel executable.  I've minimally
tested in on i386 with 'kgdb' and 'gdb6 -k'.

RCS file: /home/ncvs/src/sys/conf/,v
retrieving revision 1.84
diff -u -u -2 -r1.84
---	11 Sep 2005 00:22:21 -0000	1.84
+++	13 Sep 2005 17:46:48 -0000
@@ -83,7 +83,7 @@
 	@echo linking ${.TARGET}
-.if !defined(DEBUG)
+	${OBJCOPY} --only-keep-debug ${.TARGET} ${.TARGET}.symbols
 	${OBJCOPY} --strip-debug ${.TARGET}
+	${OBJCOPY} --add-gnu-debuglink=${.TARGET}.symbols ${.TARGET}
@@ -181,4 +181,10 @@
+.if defined(DEBUG) && !defined(NO_INSTALL_KERNEL_SYMBOLS)
 	@if [ ! -f ${KERNEL_KO} ] ; then \
@@ -201,5 +207,5 @@
 	mkdir -p ${DESTDIR}${KODIR}
-	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR}
+	${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_FILES} ${DESTDIR}${KODIR}

-- David  (obrien at

More information about the cvs-src mailing list