From cc4917abc99a62355fedeb38f7f9f55f51385227 Mon Sep 17 00:00:00 2001 From: rodrigc Date: Thu, 15 Jan 2009 02:41:26 +0000 Subject: When building up the command-line for the DTrace ctfmerge and ctfconvert utilities, add the ${DEBUG} variable from the kernel config. Otherwise, if we build a kernel with WITH_CTF=1 set, ctfmerge will not have the -g flag set. In this case, the cc has -g specified, so the .o files will have debug information generated, but since ctfmerge does not have -g set, it will strip out the ELF sections containing the DWARF debugging info, leading to a kernel without debugging symbols. Reviewed by: jb --- sys/conf/kern.pre.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/conf/kern.pre.mk') diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index ee74a9e..9eaf582 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -129,7 +129,7 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c .if defined(CTFCONVERT) -NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +NORMAL_CTFCONVERT= ${CTFCONVERT} ${DEBUG} ${CTFFLAGS} ${.TARGET} .else NORMAL_CTFCONVERT= .endif @@ -143,7 +143,7 @@ SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} SYSTEM_OBJS+= hack.So .if defined(CTFMERGE) -SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o +SYSTEM_CTFMERGE= ${CTFMERGE} ${DEBUG} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o LD+= -g .endif SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} \ -- cgit v1.1