Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf Also copy the symtab to the .gdb image. If we are ...



details:   https://anonhg.NetBSD.org/src/rev/596b96cab548
branches:  trunk
changeset: 802565:596b96cab548
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Sep 20 19:22:09 2014 +0000

description:
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.

diffstat:

 sys/conf/Makefile.kern.inc |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r f02fdf97f4f5 -r 596b96cab548 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Sat Sep 20 15:10:41 2014 +0000
+++ b/sys/conf/Makefile.kern.inc        Sat Sep 20 19:22:09 2014 +0000
@@ -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 @@
 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_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} $@.gdb; ${DBSYM} $@.gdb
+.endif
 .endif
 SYSTEM_LD_TAIL_STAGE2+=        ${SYSTEM_LD_TAIL_EXTRA}
 
@@ -553,7 +557,7 @@
        ${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



Home | Main Index | Thread Index | Old Index