summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2003-06-12 08:09:48 +0000
committergrog <grog@FreeBSD.org>2003-06-12 08:09:48 +0000
commita23727d13de564fb84a3666e8cf6a76e4d52f229 (patch)
tree810050b55f180ecf00d753bf6af03ee1dd545704 /sys/conf
parent3faa870a3bc4b6d526e9750465ddba528a2f3d9a (diff)
downloadFreeBSD-src-a23727d13de564fb84a3666e8cf6a76e4d52f229.zip
FreeBSD-src-a23727d13de564fb84a3666e8cf6a76e4d52f229.tar.gz
If we're building a debug kernel, add target to install the .gdbinit files
from tools/debugscripts.
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/kern.post.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 2eb6c8c..e6172b7 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -52,8 +52,16 @@ FULLKERNEL= ${KERNEL_KO}
FULLKERNEL= ${KERNEL_KO}.debug
${KERNEL_KO}: ${FULLKERNEL}
${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO}
-install.debug reinstall.debug:
+install.debug reinstall.debug: gdbinit
cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG ${.TARGET:R}
+
+gdbinit:
+ sed < ${S}/../tools/debugscripts/dot.gdbinit > .gdbinit \
+ "s:MODPATH:modules${S}/modules:"
+ cp ${S}/../tools/debugscripts/gdbinit.kernel \
+ ${S}/../tools/debugscripts/gdbinit.vinum ${.CURDIR}
+ cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_ARCH} \
+ ${.CURDIR}/gdbinit.machine
.endif
${FULLKERNEL}: ${SYSTEM_DEP} vers.o
OpenPOWER on IntegriCloud