Prototype + -Wall fixes.
Clean up a few printf format strings.
Added an include for the sunos_sendsig prototype
Fix "prototype disagrees about inline" error.
-/* $NetBSD: db_machdep.h,v 1.12 1994/10/26 07:50:44 cgd Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.2 1996/05/09 22:25:15 niklas Exp $ */
+/* $NetBSD: db_machdep.h,v 1.13 1996/04/29 20:50:08 leo Exp $ */
/*
* Mach Operating System
#define inst_load(ins) 0
#define inst_store(ins) 0
+#ifdef _KERNEL
+
+void kdb_kintr __P((struct mc68020_saved_state *));
+int kdb_trap __P((int, struct mc68020_saved_state *));
+
+#endif /* _KERNEL */
+
#endif /* _M68K_DB_MACHDEP_H_ */
-/* $OpenBSD: db_disasm.c,v 1.2 1996/04/21 22:17:44 deraadt Exp $ */
-/* $NetBSD: db_disasm.c,v 1.13 1996/04/01 01:38:01 briggs Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.3 1996/05/09 22:30:09 niklas Exp $ */
+/* $NetBSD: db_disasm.c,v 1.14 1996/04/29 20:50:26 leo Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
{
int sz, lused;
+ sz = 0;
switch (OPCODE_MAP(opc)) {
case 0x1: /* move.b */
sz = SIZE_BYTE;
{
int sz;
+ sz = 0;
if (BITFIELD(ext,15,13) == 3) {
/* fmove r ==> m */
addstr(dbuf, "fmov");
const char *reg;
int rtom, sz, preg;
+ reg = "???";
+ sz = 0;
rtom = ISBITSET(ext, 9);
preg = BITFIELD(ext, 12, 10);
u_short ext;
int disp, odisp, bd, od, reg;
+ odisp = 0;
+
/* check to see if we have been given the mod */
if (mod != GETMOD_BEFORE && mod != GETMOD_AFTER)
reg = BITFIELD(*dbuf->val, bit, bit-2);
u_short ext;
int disp, odisp, bd, od, reg;
+ disp = odisp = 0;
/* check to see if we have been given the mod */
if (mod != GETMOD_BEFORE && mod != GETMOD_AFTER)
reg = BITFIELD(*dbuf->val, bit, bit-2);
* it is.
*/
+ sz = 0;
addchar(*name++);
if (ISBITSET(ext,7)) {
if(ISBITSET(ext,2))
-/* $OpenBSD: db_interface.c,v 1.4 1996/04/21 22:17:49 deraadt Exp $ */
-/* $NetBSD: db_interface.c,v 1.19 1996/03/16 18:45:44 mhitch Exp $ */
+/* $OpenBSD: db_interface.c,v 1.5 1996/05/09 22:30:10 niklas Exp $ */
+/* $NetBSD: db_interface.c,v 1.20 1996/04/29 20:50:28 leo Exp $ */
/*
* Mach Operating System
#include <vm/vm.h>
+#include <dev/cons.h>
+
#include <machine/trap.h>
#include <machine/db_machdep.h>
+#include <ddb/db_command.h>
+#include <ddb/db_sym.h>
+#include <ddb/db_extern.h>
+
+
extern label_t *db_recover;
int db_active = 0;
+static void kdbprinttrap __P((int, int));
+
/*
* Received keyboard interrupt sequence.
*/
+void
kdb_kintr(regs)
register struct mc68020_saved_state *regs;
{
* kdb_trap - field a TRACE or BPT trap
* Return non-zero if we "handled" the trap.
*/
+int
kdb_trap(type, regs)
int type;
register struct mc68020_saved_state *regs;
/*
* Print trap reason.
*/
+static void
kdbprinttrap(type, code)
int type, code;
{
-/* $OpenBSD: db_trace.c,v 1.3 1996/04/19 06:18:16 niklas Exp $ */
-/* $NetBSD: db_trace.c,v 1.15 1996/02/22 23:23:41 gwr Exp $ */
+/* $OpenBSD: db_trace.c,v 1.4 1996/05/09 22:30:11 niklas Exp $ */
+/* $NetBSD: db_trace.c,v 1.16 1996/04/29 20:50:29 leo Exp $ */
/*
* Mach Operating System
#include <sys/param.h>
#include <sys/proc.h>
+#include <sys/systm.h>
#include <machine/db_machdep.h>
+#include <ddb/db_interface.h>
+#include <ddb/db_output.h>
#include <ddb/db_access.h>
#include <ddb/db_sym.h>
#include <ddb/db_variables.h>
/*
* Register list
*/
-static int db_var_short(struct db_variable *, db_expr_t *, int);
+static int db_var_short __P((struct db_variable *, db_expr_t *, int));
+
struct db_variable db_regs[] = {
{ "d0", (int *)&ddb_regs.d0, FCN_NULL },
{ "d1", (int *)&ddb_regs.d1, FCN_NULL },
};
struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
-static int db_var_short(varp, valp, op)
+static int
+db_var_short(varp, valp, op)
struct db_variable *varp;
db_expr_t *valp;
int op;
*valp = (db_expr_t) *((short*)varp->valuep);
else
*((short*)varp->valuep) = (short) *valp;
+ return(0);
}
#define MAXINT 0x7fffffff
int k_regloc[NREGISTERS];
};
+static void findentry __P((struct stackpos *));
+static void findregs __P((struct stackpos *, db_addr_t));
+static int nextframe __P((struct stackpos *, int));
+static void stacktop __P((struct mc68020_saved_state *, struct stackpos *));
+
+
#define FR_SAVFP 0
#define FR_SAVPC 4
#define K_CALLTRAMP 1 /* for k_flags: caller is __sigtramp */
#define K_SIGTRAMP 2 /* for k_flags: this is __sigtramp */
+static void
stacktop(regs, sp)
register struct mc68020_saved_state *regs;
register struct stackpos *sp;
struct nlist * trampsym = 0;
struct nlist * funcsym = 0;
+static int
nextframe(sp, kerneltrace)
register struct stackpos *sp;
int kerneltrace;
{
- int val, regp, i;
+ int i;
db_addr_t addr;
db_addr_t calladdr;
- register int instruc;
db_addr_t oldfp = sp->k_fp;
/*
return (sp->k_fp);
}
+static void
findentry(sp)
register struct stackpos *sp;
{
*/
register instruc;
register val;
- db_addr_t addr, calladdr, nextword;
+ db_addr_t addr, nextword;
label_t db_jmpbuf;
label_t *savejmp;
* Look at the procedure prolog of the current called procedure.
* Figure out which registers we saved, and where they are
*/
+static void
findregs(sp, addr)
register struct stackpos *sp;
register db_addr_t addr;
register long instruc, val, i;
int regp;
+ regp = 0;
instruc = get(addr, ISP);
if ((instruc & HIWORD) == LINKLA6) {
instruc = get(addr + 2, ISP);
db_expr_t count;
char *modif;
{
- int i, val, nargs, spa;
+ int i, val, nargs;
db_addr_t regp;
char * name;
struct stackpos pos;
boolean_t kernel_only = TRUE;
- boolean_t trace_thread = FALSE;
{
register char *cp = modif;
-/* $NetBSD: in_cksum.c,v 1.5 1994/10/26 07:51:11 cgd Exp $ */
+/* $OpenBSD: in_cksum.c,v 1.2 1996/05/09 22:30:11 niklas Exp $ */
+/* $NetBSD: in_cksum.c,v 1.6 1996/04/30 11:57:05 briggs Exp $ */
/*
* Copyright (c) 1988, 1990 Regents of the University of California.
#include <netinet/in.h>
#include <netinet/in_systm.h>
-extern int oc_cksum();
+extern int oc_cksum __P((char *buffer, int length, int startingval));
/*
* Checksum routine for the Internet Protocol family.
* inside the "if". If fact, if m_copydata & sb_compact are doing
* their job, we should never do the hairy code inside the "if".
*/
+int
in_cksum(m, len)
register struct mbuf *m;
register int len;
-/* $NetBSD: process_machdep.c,v 1.15 1995/08/13 09:05:51 mycroft Exp $ */
+/* $OpenBSD: process_machdep.c,v 1.2 1996/05/09 22:30:12 niklas Exp $ */
+/* $NetBSD: process_machdep.c,v 1.17 1996/05/06 20:05:24 gwr Exp $ */
/*
* Copyright (c) 1993 Christopher G. Demetriou
#ifdef cpu_set_init_frame
extern char kstack[]; /* XXX */
#endif
+static inline struct frame *process_frame __P((struct proc *p));
+static inline struct fpframe *process_fpframe __P((struct proc *p));
static inline struct frame *
process_frame(p)
-/* $NetBSD: sunos_machdep.c,v 1.8 1996/01/04 22:22:12 jtc Exp $ */
+/* $OpenBSD: sunos_machdep.c,v 1.6 1996/05/09 22:30:12 niklas Exp $ */
+/* $NetBSD: sunos_machdep.c,v 1.10 1996/05/05 16:11:31 veego Exp $ */
/*
* Copyright (c) 1988 University of Utah.
#include <sys/buf.h>
#include <sys/syscallargs.h>
+#include <compat/sunos/sunos.h>
#include <compat/sunos/sunos_syscallargs.h>
#include <machine/psl.h>
(void)grow(p, (unsigned)fp);
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
- printf("sunos_sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
+ printf("sunos_sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
#endif
if (useracc((caddr_t)fp, fsize, B_WRITE) == 0) {
frame->f_regs[SP] = (int)fp;
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
- printf("sunos_sendsig(%d): sig %d scp %x sc_sp %x\n",
- p->p_pid, sig, kfp.sf_sc.sc_sp);
+ printf("sunos_sendsig(%d): sig %d scp %p sc_sp %x\n",
+ p->p_pid, sig, &fp->sf_sc,kfp.sf_sc.sc_sp);
#endif
/* have the user-level trampoline code sort out what registers it
scp = (struct sunos_sigcontext *) SCARG(uap, sigcntxp);
#ifdef DEBUG
if (sigdebug & SDB_FOLLOW)
- printf("sunos_sigreturn: pid %d, scp %x\n", p->p_pid, scp);
+ printf("sunos_sigreturn: pid %d, scp %p\n", p->p_pid, scp);
#endif
if ((int)scp & 1)
return (EINVAL);