From 30e4a25f3062bbf6e045493f7e89c9fb9b832d25 Mon Sep 17 00:00:00 2001 From: mjacob Date: Thu, 17 Jan 2002 02:16:35 +0000 Subject: Allow alpha kernels to compile again- make sure opt_ddb.h is included and the reference to db_regs is *extern* from alpha/include/db_machdep.h (put it in alpha/alpha/machdep.c)- this avoids the problems we've had about different 'common' sizes prohibiting the kernel from linking. --- sys/alpha/alpha/machdep.c | 1 + sys/alpha/include/db_machdep.h | 5 ++++- sys/modules/osf1/Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index d43b841..001a684 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -169,6 +169,7 @@ SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, ""); #ifdef DDB /* start and end of kernel symbol table */ void *ksym_start, *ksym_end; +db_regs_t ddb_regs; #endif int alpha_unaligned_print = 1; /* warn about unaligned accesses */ diff --git a/sys/alpha/include/db_machdep.h b/sys/alpha/include/db_machdep.h index 8e95af8..786f271 100644 --- a/sys/alpha/include/db_machdep.h +++ b/sys/alpha/include/db_machdep.h @@ -35,6 +35,7 @@ * Machine-dependent defines for new kernel debugger. */ +#include "opt_ddb.h" #include "opt_simos.h" #include @@ -47,7 +48,9 @@ typedef vm_offset_t db_addr_t; /* address - unsigned */ typedef long db_expr_t; /* expression - signed */ typedef struct trapframe db_regs_t; -db_regs_t ddb_regs; /* register state */ +#ifdef DDB +extern db_regs_t ddb_regs; /* register state */ +#endif #define DDB_REGS (&ddb_regs) #define PC_REGS(regs) ((db_addr_t)(regs)->tf_regs[FRAME_PC]) diff --git a/sys/modules/osf1/Makefile b/sys/modules/osf1/Makefile index 33fec68..0d8d22b 100644 --- a/sys/modules/osf1/Makefile +++ b/sys/modules/osf1/Makefile @@ -7,7 +7,7 @@ MAINTAINER= gallatin@FreeBSD.org KMOD= osf1 SRCS= osf1_ioctl.c osf1_misc.c osf1_signal.c osf1_sysent.c \ osf1_mount.c imgact_osf1.c osf1_sysvec.c opt_compat.h \ - opt_simos.h opt_nfs.h device_if.h bus_if.h vnode_if.h + opt_simos.h opt_ddb.h opt_nfs.h device_if.h bus_if.h vnode_if.h #CFLAGS+= -g -- cgit v1.1