summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-09 23:04:50 +0000
commitd820f3e3ba1e6e29ce2bf7dcd9ec368578f3f3d7 (patch)
tree5ec3967e190bbeba0c2ab7e8e86b3f45ba20c19a /sys/arch
parent4ad0571c604526a0bb64f7b2d6e62d9ac8366227 (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')
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha17
-rw-r--r--sys/arch/amd64/conf/Makefile.amd6417
-rw-r--r--sys/arch/armish/conf/Makefile.armish17
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion17
-rw-r--r--sys/arch/beagle/conf/Makefile.beagle17
-rw-r--r--sys/arch/gumstix/conf/Makefile.gumstix17
-rw-r--r--sys/arch/hp300/conf/Makefile.hp30017
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa17
-rw-r--r--sys/arch/hppa64/conf/Makefile.hppa6417
-rw-r--r--sys/arch/i386/conf/Makefile.i38617
-rw-r--r--sys/arch/landisk/conf/Makefile.landisk17
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k17
-rw-r--r--sys/arch/mac68k/conf/Makefile.mac68k16
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc17
-rw-r--r--sys/arch/moko/conf/Makefile.moko17
-rw-r--r--sys/arch/mvme68k/conf/Makefile.mvme68k17
-rw-r--r--sys/arch/mvme88k/conf/Makefile.mvme88k17
-rw-r--r--sys/arch/mvmeppc/conf/Makefile.mvmeppc17
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi17
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc17
-rw-r--r--sys/arch/solbourne/conf/Makefile.solbourne17
-rw-r--r--sys/arch/sparc/conf/Makefile.sparc17
-rw-r--r--sys/arch/sparc64/conf/Makefile.sparc6415
-rw-r--r--sys/arch/vax/conf/Makefile.vax17
-rw-r--r--sys/arch/zaurus/conf/Makefile.zaurus17
25 files changed, 348 insertions, 74 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 9859cc78cf7..87fcceee8be 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.44 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.alpha,v 1.45 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.alpha,v 1.27 1996/12/01 06:12:25 jonathan Exp $
# Makefile for OpenBSD
@@ -46,6 +46,12 @@ AFLAGS= -traditional -D_LOCORE
LINKFLAGS= -N -Ttext fffffc0000230000 -e __start -G 4
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTED_CC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -115,7 +121,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -135,7 +141,7 @@ links:
SRCS= ${ALPHA}/alpha/locore.s param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${ALPHA}/alpha/cpuconf.c
+.depend: ${SRCS} assym.h param.c ${ALPHA}/alpha/cpuconf.c ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/cpuconf.c \
param.c ioconf.c ${CFILES}
@@ -146,6 +152,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index 07d6902b428..08d56696af2 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.amd64,v 1.17 2009/07/10 13:51:47 jsg Exp $
+# $OpenBSD: Makefile.amd64,v 1.18 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -52,6 +52,12 @@ AFLAGS= -x assembler-with-cpp -D_LOCORE
LINKFLAGS= -Ttext 0xffffffff801001e0 -e start -X
STRIPFLAGS= -g -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -129,7 +135,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -151,7 +157,7 @@ AFILES= ${AMD64}/amd64/locore.S ${AMD64}/amd64/vector.S ${AMD64}/amd64/copy.S \
${AMD64}/amd64/spl.S
SRCS= param.c ioconf.c ${AFILES} ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${AFILES}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -161,6 +167,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish
index b9782cffd15..dd6eedb0f6c 100644
--- a/sys/arch/armish/conf/Makefile.armish
+++ b/sys/arch/armish/conf/Makefile.armish
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armish,v 1.10 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.armish,v 1.11 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $
# Makefile for OpenBSD
@@ -57,6 +57,12 @@ LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -143,7 +149,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -164,7 +170,7 @@ links:
SRCS= ${ARM}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -177,6 +183,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
index 0b5d1280aea..6b41a389097 100644
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ b/sys/arch/aviion/conf/Makefile.aviion
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.aviion,v 1.8 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.aviion,v 1.9 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD
#
@@ -52,6 +52,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -Ttext 0x1000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS?= ${CFLAGS}
@@ -128,7 +134,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -150,7 +156,7 @@ links:
SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -161,6 +167,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/beagle/conf/Makefile.beagle b/sys/arch/beagle/conf/Makefile.beagle
index 7c1093df1ff..d45eef3478d 100644
--- a/sys/arch/beagle/conf/Makefile.beagle
+++ b/sys/arch/beagle/conf/Makefile.beagle
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.beagle,v 1.2 2009/05/24 21:02:48 drahn Exp $
+# $OpenBSD: Makefile.beagle,v 1.3 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -55,6 +55,12 @@ LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -139,7 +145,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -160,7 +166,7 @@ links:
SRCS= ${ARM}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -172,6 +178,11 @@ depend:: .depend
@sed -e 's/.*\.o:.* /assym.h: /' < 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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/gumstix/conf/Makefile.gumstix b/sys/arch/gumstix/conf/Makefile.gumstix
index 9255edc4769..0aea374f3f6 100644
--- a/sys/arch/gumstix/conf/Makefile.gumstix
+++ b/sys/arch/gumstix/conf/Makefile.gumstix
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.gumstix,v 1.2 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.gumstix,v 1.3 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $
# Makefile for OpenBSD
@@ -57,6 +57,12 @@ LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -141,7 +147,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -162,7 +168,7 @@ links:
SRCS= ${ARM}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -175,6 +181,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300
index 4f7ed93ade4..c4e560eae09 100644
--- a/sys/arch/hp300/conf/Makefile.hp300
+++ b/sys/arch/hp300/conf/Makefile.hp300
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hp300,v 1.45 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.hp300,v 1.46 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.hp300,v 1.54 1997/04/01 23:16:41 scottr Exp $
# Makefile for OpenBSD
@@ -51,6 +51,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -n -Ttext 0 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -161,7 +167,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -182,7 +188,7 @@ links:
SRCS= ${HP300}/hp300/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} ${HP300}/hp300/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
@@ -194,6 +200,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index c6b468c9f32..4c66591f8fe 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.35 2009/08/09 21:33:36 miod Exp $
+# $OpenBSD: Makefile.hppa,v 1.36 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -69,6 +69,12 @@ LIBSPMATH= ${SPMATH_PROF}
.endif
.endif
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -140,7 +146,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -160,7 +166,7 @@ links:
SRCS= ${HPPA}/hppa/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
@@ -172,6 +178,11 @@ SRCS= ${HPPA}/hppa/locore.S \
< 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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64
index 8b764075ebc..29894d638e5 100644
--- a/sys/arch/hppa64/conf/Makefile.hppa64
+++ b/sys/arch/hppa64/conf/Makefile.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa64,v 1.9 2009/08/09 21:33:38 miod Exp $
+# $OpenBSD: Makefile.hppa64,v 1.10 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -51,6 +51,12 @@ STRIPFLAGS= -g -x
CFLAGS+= -fno-omit-frame-pointer
.endif
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -124,7 +130,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -144,7 +150,7 @@ links:
SRCS= ${HPPA}/hppa64/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa64/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
-if test -n "${SFILES}"; then \
@@ -156,6 +162,11 @@ SRCS= ${HPPA}/hppa64/locore.S \
< 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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index abfc61545cc..25a5609b156 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.52 2009/07/10 13:51:47 jsg Exp $
+# $OpenBSD: Makefile.i386,v 1.53 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -56,6 +56,12 @@ AFLAGS+=-m32
LINKFLAGS+=-melf_i386_obsd
.endif
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -133,7 +139,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -154,7 +160,7 @@ links:
SRCS= ${I386}/i386/locore.s \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${I386}/i386/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -164,6 +170,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk
index 80c9014d7fc..86b804ef8ec 100644
--- a/sys/arch/landisk/conf/Makefile.landisk
+++ b/sys/arch/landisk/conf/Makefile.landisk
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.landisk,v 1.10 2009/08/09 21:33:38 miod Exp $
+# $OpenBSD: Makefile.landisk,v 1.11 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD/landisk
#
@@ -52,6 +52,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -Wa,-little
LINKFLAGS= -N -Ttext 0x8c002000 -e start --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -129,7 +135,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
@@ -150,7 +156,7 @@ links:
SRCS= ${LANDISK}/landisk/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} ${LANDISK}/landisk/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -162,6 +168,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index 261dc7dea01..a2d0cf53238 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.14 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.luna88k,v 1.15 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD
#
@@ -50,6 +50,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 0x20000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS?= ${CFLAGS}
@@ -124,7 +130,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -146,7 +152,7 @@ links:
SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -157,6 +163,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k
index 0c48b1d377a..8a9544c301f 100644
--- a/sys/arch/mac68k/conf/Makefile.mac68k
+++ b/sys/arch/mac68k/conf/Makefile.mac68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mac68k,v 1.42 2009/08/09 21:33:38 miod Exp $
+# $OpenBSD: Makefile.mac68k,v 1.43 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.mac68k,v 1.53 1997/04/15 06:11:38 scottr Exp $
# Makefile for OpenBSD
@@ -51,6 +51,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -n -Ttext 0 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -132,7 +138,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -153,7 +159,7 @@ links:
SRCS= ${MAC68K}/mac68k/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} ${MAC68K}/mac68k/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -166,6 +172,10 @@ 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
# depend on root or device configuration
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index ae7c6af1381..721c713def3 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.31 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.macppc,v 1.32 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD PowerPC
#
@@ -51,6 +51,12 @@ AFLAGS= -D_LOCORE -Wa,-many
LINKFLAGS= -N -Ttext 100114 -e start --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -126,7 +132,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
@@ -147,7 +153,7 @@ links:
SRCS= ${MACPPC}/macppc/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} ${MACPPC}/macppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -159,6 +165,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/moko/conf/Makefile.moko b/sys/arch/moko/conf/Makefile.moko
index c14097e0af2..90b878f491a 100644
--- a/sys/arch/moko/conf/Makefile.moko
+++ b/sys/arch/moko/conf/Makefile.moko
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.moko,v 1.2 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.moko,v 1.3 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -56,6 +56,12 @@ LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -140,7 +146,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -161,7 +167,7 @@ links:
SRCS= ${ARM}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -174,6 +180,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/mvme68k/conf/Makefile.mvme68k b/sys/arch/mvme68k/conf/Makefile.mvme68k
index 0871cbb2cbf..c227f1705ce 100644
--- a/sys/arch/mvme68k/conf/Makefile.mvme68k
+++ b/sys/arch/mvme68k/conf/Makefile.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme68k,v 1.34 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.mvme68k,v 1.35 2009/08/09 23:04:49 miod Exp $
# This makefile is constructed from a machine description:
# config machineid
@@ -50,6 +50,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -Ttext 0x10000 -z -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -126,7 +132,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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 \
@@ -148,7 +154,7 @@ links:
SRCS= ${MVME68K}/mvme68k/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} ${MVME68K}/mvme68k/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -158,6 +164,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/mvme88k/conf/Makefile.mvme88k b/sys/arch/mvme88k/conf/Makefile.mvme88k
index bc6f06f942d..7bcdbfbf545 100644
--- a/sys/arch/mvme88k/conf/Makefile.mvme88k
+++ b/sys/arch/mvme88k/conf/Makefile.mvme88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme88k,v 1.45 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.mvme88k,v 1.46 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD
#
@@ -50,6 +50,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -Ttext 0x10000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS?= ${CFLAGS}
@@ -127,7 +133,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -149,7 +155,7 @@ links:
SRCS= param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c
+.depend: ${SRCS} assym.h param.c ${DB_STRUCTINFO}
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -160,6 +166,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/mvmeppc/conf/Makefile.mvmeppc b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
index db542cd0d2d..3facc2dae59 100644
--- a/sys/arch/mvmeppc/conf/Makefile.mvmeppc
+++ b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvmeppc,v 1.29 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.mvmeppc,v 1.30 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD PowerPC
#
@@ -51,6 +51,12 @@ AFLAGS= -D_LOCORE
LINKFLAGS= -N -Ttext 100114 -e start --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -126,7 +132,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
@@ -147,7 +153,7 @@ links:
SRCS= ${MVMEPPC}/mvmeppc/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} ${MVMEPPC}/mvmeppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -159,6 +165,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
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
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index 0d5b92fc285..b13f33fb9be 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.3 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.socppc,v 1.4 2009/08/09 23:04:49 miod Exp $
#
# Makefile for OpenBSD PowerPC
#
@@ -51,6 +51,12 @@ AFLAGS= -D_LOCORE -Wa,-many
LINKFLAGS= -N -Ttext 200000 -e start --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -126,7 +132,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
@@ -147,7 +153,7 @@ links:
SRCS= ${SOCPPC}/socppc/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} ${SOCPPC}/socppc/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -159,6 +165,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/solbourne/conf/Makefile.solbourne b/sys/arch/solbourne/conf/Makefile.solbourne
index 1e8cf824423..b18234ad9b4 100644
--- a/sys/arch/solbourne/conf/Makefile.solbourne
+++ b/sys/arch/solbourne/conf/Makefile.solbourne
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.solbourne,v 1.10 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.solbourne,v 1.11 2009/08/09 23:04:49 miod Exp $
# Makefile for OpenBSD
#
@@ -52,6 +52,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -N -e start -T ${SOLBOURNE}/conf/ld.script -Ttext FD084000
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -129,7 +135,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -150,7 +156,7 @@ links:
SRCS= ${SOLBOURNE}/solbourne/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} ${SOLBOURNE}/solbourne/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
@@ -162,6 +168,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
+
locore.o: ${SOLBOURNE}/solbourne/locore.s assym.h
${NORMAL_S}
diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc
index 6945522d931..7f1674c93a5 100644
--- a/sys/arch/sparc/conf/Makefile.sparc
+++ b/sys/arch/sparc/conf/Makefile.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc,v 1.46 2009/08/09 21:33:39 miod Exp $
+# $OpenBSD: Makefile.sparc,v 1.47 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.sparc,v 1.32.4.1 1996/06/12 20:26:32 pk Exp $
# Makefile for OpenBSD
@@ -58,6 +58,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -N -e start -Ttext F8004000
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -135,7 +141,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -156,7 +162,7 @@ links:
SRCS= ${SPARC}/sparc/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} ${SPARC}/sparc/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
@@ -168,6 +174,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64
index fbd4a01d8c0..0087d1244f0 100644
--- a/sys/arch/sparc64/conf/Makefile.sparc64
+++ b/sys/arch/sparc64/conf/Makefile.sparc64
@@ -29,6 +29,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -Wa,-Av9b
LINKFLAGS= -n -Ttext 01000000 -Tdata 01800000 -e start -N
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -106,7 +112,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -127,7 +133,7 @@ links:
SRCS= ${SPARC64}/sparc64/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} ${SPARC64}/sparc64/locore.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if !empty(SFILES)
@@ -139,6 +145,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
+
locore.o: ${SPARC64}/sparc64/locore.s assym.h
${NORMAL_S}
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index ca1b279da76..11e75ab8abd 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.vax,v 1.33 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.vax,v 1.34 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.vax,v 1.49 1999/07/26 05:20:49 cgd Exp $
# Makefile for OpenBSD/vax
@@ -77,6 +77,12 @@ AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
LINKFLAGS= -N -Ttext 80000000 -e start
STRIPFLAGS= -d
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTED_CC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -141,7 +147,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean:: cleankernel
cleankernel:
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
@@ -164,7 +170,7 @@ SRCS= ${VAX}/vax/intvec.s ${VAX}/vax/subr.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} ${VAX}/vax/intvec.s ${VAX}/vax/subr.s
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
@@ -174,6 +180,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile
diff --git a/sys/arch/zaurus/conf/Makefile.zaurus b/sys/arch/zaurus/conf/Makefile.zaurus
index 4c971954f04..47e655fe4ef 100644
--- a/sys/arch/zaurus/conf/Makefile.zaurus
+++ b/sys/arch/zaurus/conf/Makefile.zaurus
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.zaurus,v 1.13 2009/01/11 21:02:03 pirofti Exp $
+# $OpenBSD: Makefile.zaurus,v 1.14 2009/08/09 23:04:49 miod Exp $
# $NetBSD: Makefile.i386,v 1.67 1996/05/11 16:12:11 mycroft Exp $
# Makefile for OpenBSD
@@ -57,6 +57,12 @@ LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
+.if ${IDENT:M-DDDB_STRUCT}
+DB_STRUCTINFO= db_structinfo.h
+.else
+DB_STRUCTINFO=
+.endif
+
HOSTCC= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
@@ -141,7 +147,7 @@ newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
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:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
@@ -162,7 +168,7 @@ links:
SRCS= ${ARM}/arm/locore.S \
param.c ioconf.c ${CFILES} ${SFILES}
depend:: .depend
-.depend: ${SRCS} assym.h param.c ${APMINC}
+.depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO}
${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S
${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
.if ${SFILES} != ""
@@ -175,6 +181,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
+
# depend on root or device configuration
autoconf.o conf.o: Makefile