diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-11-17 19:23:02 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2005-11-17 19:23:02 +0000 |
commit | 4b9c9a8d20d167e6e7ed0cbb17c9b38ccfd92883 (patch) | |
tree | 83524908bbd955e474d5c0d6a18037c761c80529 /sys/kern/kgdb_stub.c | |
parent | 03ab1c620ef1ac7cab97d4a0f06a17df34c1ff26 (diff) |
style; no binary change.
Diffstat (limited to 'sys/kern/kgdb_stub.c')
-rw-r--r-- | sys/kern/kgdb_stub.c | 50 |
1 files changed, 15 insertions, 35 deletions
diff --git a/sys/kern/kgdb_stub.c b/sys/kern/kgdb_stub.c index 290d78c6366..ed16f36911a 100644 --- a/sys/kern/kgdb_stub.c +++ b/sys/kern/kgdb_stub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kgdb_stub.c,v 1.7 2005/11/13 17:50:45 fgsch Exp $ */ +/* $OpenBSD: kgdb_stub.c,v 1.8 2005/11/17 19:23:01 fgsch Exp $ */ /* $NetBSD: kgdb_stub.c,v 1.6 1998/08/30 20:30:57 scottr Exp $ */ /* @@ -90,9 +90,7 @@ static kgdb_reg_t gdb_regs[KGDB_NUMREGS]; * This little routine exists simply so that bcopy() can be debugged. */ static void -kgdb_copy(vsrc, vdst, len) - void *vsrc, *vdst; - int len; +kgdb_copy(void *vsrc, void *vdst, int len) { char *src = vsrc; char *dst = vdst; @@ -104,9 +102,7 @@ kgdb_copy(vsrc, vdst, len) #if 0 /* ditto for bzero */ static void -kgdb_zero(vptr, len) - void *vptr; - int len; +kgdb_zero(void *vptr, int len) { char *ptr = vptr; @@ -121,16 +117,15 @@ kgdb_zero(vptr, len) * valid hex digit. */ static int -digit2i(c) - u_char c; +digit2i(u_char c) { if (c >= '0' && c <= '9') return (c - '0'); else if (c >= 'a' && c <= 'f') - return (c - 'a' + 10); + return (c - 'a' + 10); else if (c >= 'A' && c <= 'F') - return (c - 'A' + 10); + return (c - 'A' + 10); else return (-1); } @@ -140,8 +135,7 @@ digit2i(c) * an hex digit. */ static u_char -i2digit(n) - int n; +i2digit(int n) { return ("0123456789abcdef"[n & 0x0f]); } @@ -150,9 +144,7 @@ i2digit(n) * Convert a byte array into an hex string. */ static void -mem2hex(vdst, vsrc, len) - void *vdst, *vsrc; - int len; +mem2hex(void *vdst, void *vsrc, int len) { u_char *dst = vdst; u_char *src = vsrc; @@ -171,10 +163,7 @@ mem2hex(vdst, vsrc, len) * the middle of a byte, NULL is returned. */ static u_char * -hex2mem(vdst, src, maxlen) - void *vdst; - u_char *src; - int maxlen; +hex2mem(void *vdst, u_char *src, int maxlen) { u_char *dst = vdst; int msb, lsb; @@ -195,10 +184,9 @@ hex2mem(vdst, src, maxlen) * Convert an hex string into an integer. * This returns a pointer to the character following * the last valid hex digit. - */ + */ static vaddr_t -hex2i(srcp) - u_char **srcp; +hex2i(u_char **srcp) { char *src = *srcp; vaddr_t r = 0; @@ -217,8 +205,7 @@ hex2i(srcp) * Send a packet. */ static void -kgdb_send(bp) - u_char *bp; +kgdb_send(u_char *bp) { u_char *p; u_char csum, c; @@ -243,9 +230,7 @@ kgdb_send(bp) * Receive a packet. */ static int -kgdb_recv(bp, maxlen) - u_char *bp; - int maxlen; +kgdb_recv(u_char *bp, int maxlen) { u_char *p; int c, csum; @@ -297,10 +282,7 @@ kgdb_recv(bp, maxlen) * This is called by the appropriate tty driver. */ void -kgdb_attach(getfn, putfn, ioarg) - int (*getfn)(void *); - void (*putfn)(void *, int); - void *ioarg; +kgdb_attach(int (*getfn)(void *), void (*putfn)(void *, int), void *ioarg) { kgdb_getc = getfn; kgdb_putc = putfn; @@ -315,9 +297,7 @@ kgdb_attach(getfn, putfn, ioarg) * that is what the gdb/remote.c functions want to return. */ int -kgdb_trap(type, regs) - int type; - db_regs_t *regs; +kgdb_trap(int type, db_regs_t *regs) { label_t jmpbuf; vaddr_t addr; |