diff options
author | markm <markm@FreeBSD.org> | 2002-09-21 18:53:58 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-09-21 18:53:58 +0000 |
commit | 138978c49736754bf4a83e00a6bc7a1dd8e1a7e8 (patch) | |
tree | 82eac6a8dfa7c02b60c62321e7d03bbe7d186002 /sys | |
parent | ac87fc24a674a749d2fd4c0136cf2cd69f303678 (diff) | |
download | FreeBSD-src-138978c49736754bf4a83e00a6bc7a1dd8e1a7e8.zip FreeBSD-src-138978c49736754bf4a83e00a6bc7a1dd8e1a7e8.tar.gz |
Code tidy-up. ISOfy, turn a macro into an inline for lint(1) (perhaps
this needs to go to cpufunc.h?), de-register.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/db_interface.c | 31 | ||||
-rw-r--r-- | sys/i386/i386/db_interface.c | 31 |
2 files changed, 30 insertions, 32 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index 26635d3..91c993d 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -59,17 +59,23 @@ db_regs_t ddb_regs; static jmp_buf db_global_jmpbuf; +static __inline u_short +rss(void) +{ + u_short ss; #ifdef __GNUC__ -#define rss() ({u_short ss; __asm __volatile("mov %%ss,%0" : "=r" (ss)); ss;}) + __asm __volatile("mov %%ss,%0" : "=r" (ss)); +#else + ss = 0; /* XXXX Fix for other compilers. */ #endif + return ss; +} /* * kdb_trap - field a TRACE or BPT trap */ int -kdb_trap(type, code, regs) - int type, code; - register struct i386_saved_state *regs; +kdb_trap(int type, int code, struct i386_saved_state *regs) { volatile int ddb_mode = !(boothowto & RB_GDB); @@ -217,12 +223,9 @@ kdb_trap(type, code, regs) * Read bytes from kernel address space for debugger. */ void -db_read_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_read_bytes(vm_offset_t addr, size_t size, char *data) { - register char *src; + char *src; db_nofault = &db_jmpbuf; @@ -237,12 +240,9 @@ db_read_bytes(addr, size, data) * Write bytes to kernel address space for debugger. */ void -db_write_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_write_bytes(vm_offset_t addr, size_t size, char *data) { - register char *dst; + char *dst; unsigned *ptep0 = NULL; unsigned oldmap0 = 0; @@ -302,8 +302,7 @@ db_write_bytes(addr, size, data) * installed. */ void -Debugger(msg) - const char *msg; +Debugger(const char *msg) { static volatile u_int in_Debugger; diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c index 26635d3..91c993d 100644 --- a/sys/i386/i386/db_interface.c +++ b/sys/i386/i386/db_interface.c @@ -59,17 +59,23 @@ db_regs_t ddb_regs; static jmp_buf db_global_jmpbuf; +static __inline u_short +rss(void) +{ + u_short ss; #ifdef __GNUC__ -#define rss() ({u_short ss; __asm __volatile("mov %%ss,%0" : "=r" (ss)); ss;}) + __asm __volatile("mov %%ss,%0" : "=r" (ss)); +#else + ss = 0; /* XXXX Fix for other compilers. */ #endif + return ss; +} /* * kdb_trap - field a TRACE or BPT trap */ int -kdb_trap(type, code, regs) - int type, code; - register struct i386_saved_state *regs; +kdb_trap(int type, int code, struct i386_saved_state *regs) { volatile int ddb_mode = !(boothowto & RB_GDB); @@ -217,12 +223,9 @@ kdb_trap(type, code, regs) * Read bytes from kernel address space for debugger. */ void -db_read_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_read_bytes(vm_offset_t addr, size_t size, char *data) { - register char *src; + char *src; db_nofault = &db_jmpbuf; @@ -237,12 +240,9 @@ db_read_bytes(addr, size, data) * Write bytes to kernel address space for debugger. */ void -db_write_bytes(addr, size, data) - vm_offset_t addr; - register size_t size; - register char *data; +db_write_bytes(vm_offset_t addr, size_t size, char *data) { - register char *dst; + char *dst; unsigned *ptep0 = NULL; unsigned oldmap0 = 0; @@ -302,8 +302,7 @@ db_write_bytes(addr, size, data) * installed. */ void -Debugger(msg) - const char *msg; +Debugger(const char *msg) { static volatile u_int in_Debugger; |