diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-09 23:04:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-09 23:04:50 +0000 |
commit | d820f3e3ba1e6e29ce2bf7dcd9ec368578f3f3d7 (patch) | |
tree | 5ec3967e190bbeba0c2ab7e8e86b3f45ba20c19a /sys/arch/sgi | |
parent | 4ad0571c604526a0bb64f7b2d6e62d9ac8366227 (diff) |
Introduce option DDB_STRUCT. Kernels compiled with this option (except on
a few arches where toolchain limitations apply) will embed some symbolic
information about the various structs used within the kernel, and have
new ddb commands allowing struct display and some useful information
gathering. Kernel rodata increase varies accross platforms from ~150KB to
~300KB.
This option is not enabled by default.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/conf/Makefile.sgi | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi index b3d156431c2..434ef5af0c1 100644 --- a/sys/arch/sgi/conf/Makefile.sgi +++ b/sys/arch/sgi/conf/Makefile.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sgi,v 1.23 2009/08/09 21:33:39 miod Exp $ +# $OpenBSD: Makefile.sgi,v 1.24 2009/08/09 23:04:49 miod Exp $ # Makefile for OpenBSD # @@ -60,6 +60,12 @@ CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -x assembler-with-cpp -mno-abicalls ${ABI} -D_LOCORE STRIPFLAGS= -g -X -x +.if ${IDENT:M-DDDB_STRUCT} +DB_STRUCTINFO= db_structinfo.h +.else +DB_STRUCTINFO= +.endif + NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $< NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $< NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $< @@ -108,7 +114,7 @@ newvers: clean:: rm -f eddep bsd bsd.gdb tags *.[io] [a-z]*.s \ - [Ee]rrs linterrs makelinks assym.h + [Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO} lint: /tmp param.c @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ @@ -168,7 +174,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} SRCS= ${SGI}/sgi/locore.S \ param.c ioconf.c ${CFILES} ${SFILES} depend:: .depend -.depend: ${SRCS} assym.h param.c +.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO} ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SGI}/sgi/locore.S ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES} @@ -178,6 +184,11 @@ depend:: .depend < assym.dep >> .depend @rm -f assym.dep +db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.awk + ${CC} ${CFLAGS} ${CPPFLAGS} -gstabs -c $S/ddb/db_structinfo.c + objdump -g db_structinfo.o | awk -f $S/ddb/parse_structinfo.awk > $@ + rm -f db_structinfo.o + # The install target can be redefined by putting a # install-kernel-${MACHINE_NAME} target into /etc/mk.conf MACHINE_NAME!= uname -n |