Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161698597
D1006.id2140.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D1006.id2140.diff
View Options
Index: etc/Makefile
===================================================================
--- etc/Makefile
+++ etc/Makefile
@@ -326,7 +326,7 @@
mtree/BSD.var.dist /var \
mtree/BSD.usr.dist /usr \
mtree/BSD.include.dist /usr/include
-.if ${MK_DEBUG_FILES} != "no"
+.if ${MK_DEBUG_FILES} != "no" || ${MK_KERNEL_SYMBOLS} != "no"
MTREES+= mtree/BSD.debug.dist /usr/lib
.endif
.if ${MK_GROFF} != "no"
Index: etc/mtree/BSD.debug.dist
===================================================================
--- etc/mtree/BSD.debug.dist
+++ etc/mtree/BSD.debug.dist
@@ -9,6 +9,8 @@
bin
..
boot
+ kernel
+ ..
..
lib
geom
Index: share/mk/src.opts.mk
===================================================================
--- share/mk/src.opts.mk
+++ share/mk/src.opts.mk
@@ -98,6 +98,7 @@
IPFW \
JAIL \
KDUMP \
+ KERNEL_SYMBOLS \
KVM \
LDNS \
LDNS_UTILS \
Index: sys/conf/kern.post.mk
===================================================================
--- sys/conf/kern.post.mk
+++ sys/conf/kern.post.mk
@@ -101,11 +101,11 @@
.if !defined(DEBUG)
FULLKERNEL= ${KERNEL_KO}
.else
-FULLKERNEL= ${KERNEL_KO}.debug
-${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.symbols
- ${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.symbols\
+FULLKERNEL= ${KERNEL_KO}.full
+${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.debug
+ ${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.debug \
${FULLKERNEL} ${.TARGET}
-${KERNEL_KO}.symbols: ${FULLKERNEL}
+${KERNEL_KO}.debug: ${FULLKERNEL}
${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET}
install.debug reinstall.debug: gdbinit
cd ${.CURDIR}; ${MAKE} ${.TARGET:R}
@@ -154,7 +154,7 @@
kernel-clean:
rm -f *.o *.so *.So *.ko *.s eddep errs \
- ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.symbols \
+ ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \
linterrs tags vers.c \
vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
@@ -252,19 +252,25 @@
if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \
chflags -R noschg ${DESTDIR}${KODIR} ; \
rm -rf ${DESTDIR}${KODIR} ; \
+ rm -rf ${DESTDIR}${DEBUGDIR}${KODIR} ; \
else \
if [ -d ${DESTDIR}${KODIR}.old ] ; then \
chflags -R noschg ${DESTDIR}${KODIR}.old ; \
rm -rf ${DESTDIR}${KODIR}.old ; \
fi ; \
mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \
+ if [ -d ${DESTDIR}${DEBUGDIR}${KODIR} ]; then \
+ rm -rf ${DESTDIR}${DEBUGDIR}${KODIR}.old ; \
+ mv ${DESTDIR}${DEBUGDIR}${KODIR} ${DESTDIR}${DEBUGDIR}${KODIR}.old ; \
+ fi ; \
sysctl kern.bootfile=${DESTDIR}${KODIR}.old/"`basename "$$thiskernel"`" ; \
fi
.endif
mkdir -p ${DESTDIR}${KODIR}
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}
.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
- ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR}
+ mkdir -p ${DESTDIR}${DEBUGDIR}${KODIR}
+ ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${DEBUGDIR}${KODIR}
.endif
.if defined(KERNEL_EXTRA_INSTALL)
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR}
@@ -276,7 +282,7 @@
@-chflags -R noschg ${DESTDIR}${KODIR}
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}
.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
- ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR}
+ ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KODIR}
.endif
config.o env.o hints.o vers.o vnode_if.o:
Index: sys/conf/kmod.mk
===================================================================
--- sys/conf/kmod.mk
+++ sys/conf/kmod.mk
@@ -169,11 +169,11 @@
.if !defined(DEBUG_FLAGS)
FULLPROG= ${PROG}
.else
-FULLPROG= ${PROG}.debug
-${PROG}: ${FULLPROG} ${PROG}.symbols
- ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.symbols\
+FULLPROG= ${PROG}.full
+${PROG}: ${FULLPROG} ${PROG}.debug
+ ${OBJCOPY} --strip-debug --add-gnu-debuglink=${PROG}.debug \
${FULLPROG} ${.TARGET}
-${PROG}.symbols: ${FULLPROG}
+${PROG}.debug: ${FULLPROG}
${OBJCOPY} --only-keep-debug ${FULLPROG} ${.TARGET}
.endif
@@ -268,7 +268,7 @@
CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS}
.if defined(DEBUG_FLAGS)
-CLEANFILES+= ${FULLPROG} ${PROG}.symbols
+CLEANFILES+= ${FULLPROG} ${PROG}.debug
.endif
.if !target(install)
@@ -286,7 +286,7 @@
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
- ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR}
+ ${_INSTALLFLAGS} ${PROG}.debug ${DESTDIR}${DEBUGDIR}${KMODDIR}
.endif
.include <bsd.links.mk>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 7, 1:31 AM (15 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34776898
Default Alt Text
D1006.id2140.diff (4 KB)
Attached To
Mode
D1006: Install kernel debug data under /usr/lib/debug
Attached
Detach File
Event Timeline
Log In to Comment