Module Name: src
Committed By: matt
Date: Sat Sep 20 19:22:10 UTC 2014
Modified Files:
src/sys/conf: Makefile.kern.inc
Log Message:
Also copy the symtab to the .gdb image. If we are producing a .gdb, grab
the symtab from that since it will be a bit larger than the one from the
stripped kernel and thus can't be inserted into the .gdb kernel.
To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/conf/Makefile.kern.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.173 src/sys/conf/Makefile.kern.inc:1.174
--- src/sys/conf/Makefile.kern.inc:1.173 Fri Sep 5 06:52:12 2014
+++ src/sys/conf/Makefile.kern.inc Sat Sep 20 19:22:09 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.173 2014/09/05 06:52:12 matt Exp $
+# $NetBSD: Makefile.kern.inc,v 1.174 2014/09/20 19:22:09 matt Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -259,6 +259,7 @@ SYSTEM_LD_TAIL+=${SYSTEM_LD_TAIL_DEBUG}
LINKFLAGS+= ${LINKFLAGS_DEBUG}
EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@}
CTFFLAGS+= -g
+TARGETSFX= .gdb
.elifndef PROF
LINKFLAGS+= ${LINKFLAGS_NORMAL}
.endif
@@ -268,6 +269,9 @@ SYSTEM_LD_TAIL_STAGE1= ${SYSTEM_LD_TAIL}
SYSTEM_LD_TAIL_STAGE2= ${SYSTEM_LD_TAIL}
.if defined(COPY_SYMTAB)
SYSTEM_LD_TAIL_STAGE2+= ; echo ${DBSYM} $@; ${DBSYM} $@
+.if !empty(DEBUG:M-g)
+SYSTEM_LD_TAIL_STAGE2+= ; echo ${DBSYM} [email protected]; ${DBSYM} [email protected]
+.endif
.endif
SYSTEM_LD_TAIL_STAGE2+= ${SYSTEM_LD_TAIL_EXTRA}
@@ -553,7 +557,7 @@ build_kernel: .USE
${SYSTEM_LD} swap${.TARGET}.o kern_ksyms_buf.o
${SYSTEM_LD_TAIL_STAGE1}
${CC} ${CFLAGS} ${CPPFLAGS} -DCOPY_SYMTAB \
- -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}) \
+ -DSYMTAB_SPACE=$$(${DBSYM} -P ${.TARGET}${TARGETSFX}) \
-c $S/kern/kern_ksyms_buf.c -o kern_ksyms_buf_real.o
${SYSTEM_LD_HEAD}
${SYSTEM_LD} swap${.TARGET}.o kern_ksyms_buf_real.o