If generating a gdb kernel and using dbsym, insert the symbols into it.

(This is useful when using the .gdb with an emulator so that ddb in the
emulator will have symbols).
This commit is contained in:
matt 2011-02-17 18:47:13 +00:00
parent 69e6dfca57
commit d6c7c66ed9
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.129 2011/01/04 01:52:30 matt Exp $
# $NetBSD: Makefile.kern.inc,v 1.130 2011/02/17 18:47:13 matt Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@ -249,6 +249,12 @@ SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
LINKFLAGS+= ${LINKFLAGS_DEBUG}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
CTFFLAGS+= -g
SYSTEM_LD_TAIL+=; \
if grep '^\#define.*SYMTAB_SPACE' opt_ddbparam.h > /dev/null; then \
echo "${DBSYM} $@.gdb"; \
${DBSYM} $@.gdb; \
fi
.elifndef PROF
LINKFLAGS+= ${LINKFLAGS_NORMAL}
.endif