Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips KNF, ANSIfy.



details:   https://anonhg.NetBSD.org/src/rev/bb886e5bafef
branches:  trunk
changeset: 517979:bb886e5bafef
user:      simonb <simonb%NetBSD.org@localhost>
date:      Thu Nov 22 06:58:03 2001 +0000

description:
KNF, ANSIfy.
Change print_addr() to take an db_addr_t argument instead of a long.

diffstat:

 sys/arch/mips/mips/db_disasm.c |  17 +++++------------
 sys/arch/mips/mips/db_trace.c  |  26 ++++++++++----------------
 2 files changed, 15 insertions(+), 28 deletions(-)

diffs (105 lines):

diff -r 50199ccfc330 -r bb886e5bafef sys/arch/mips/mips/db_disasm.c
--- a/sys/arch/mips/mips/db_disasm.c    Thu Nov 22 06:00:31 2001 +0000
+++ b/sys/arch/mips/mips/db_disasm.c    Thu Nov 22 06:58:03 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.8 2001/11/22 06:00:31 simonb Exp $     */
+/*     $NetBSD: db_disasm.c,v 1.9 2001/11/22 06:58:03 simonb Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -136,7 +136,7 @@
        "taglo",    "taghi",    "errepc",  "desave"
 };
 
-static void print_addr(long);
+static void print_addr(db_addr_t);
 
 /*
  * Disassemble instruction at 'loc'.  'altfmt' specifies an
@@ -148,10 +148,7 @@
  * be executed but the 'linear' next instruction.
  */
 db_addr_t
-db_disasm(loc, altfmt)
-       db_addr_t       loc;
-       boolean_t       altfmt;
-
+db_disasm(db_addr_t loc, boolean_t altfmt)
 {
        u_int32_t instr;
 
@@ -180,10 +177,7 @@
  * 'loc' may in fact contain a breakpoint instruction.
  */
 db_addr_t
-db_disasm_insn(insn, loc, altfmt)
-       int             insn;
-       db_addr_t       loc;
-       boolean_t       altfmt;
+db_disasm_insn(int insn, db_addr_t loc, boolean_t altfmt)
 {
        boolean_t bdslot = FALSE;
        InstFmt i;
@@ -488,8 +482,7 @@
 }
 
 static void
-print_addr(loc)
-       long loc;
+print_addr(db_addr_t loc)
 {
        db_expr_t diff;
        db_sym_t sym;
diff -r 50199ccfc330 -r bb886e5bafef sys/arch/mips/mips/db_trace.c
--- a/sys/arch/mips/mips/db_trace.c     Thu Nov 22 06:00:31 2001 +0000
+++ b/sys/arch/mips/mips/db_trace.c     Thu Nov 22 06:58:03 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_trace.c,v 1.19 2001/05/06 12:50:45 simonb Exp $     */
+/*     $NetBSD: db_trace.c,v 1.20 2001/11/22 06:58:03 simonb Exp $     */
 
 /*
  * Mach Operating System
@@ -123,12 +123,8 @@
 const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
 
 void
-db_stack_trace_print(addr, have_addr, count, modif, pr)
-       db_expr_t       addr;
-       boolean_t       have_addr;
-       db_expr_t       count;
-       char            *modif;
-       void            (*pr) __P((const char *, ...));
+db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+    char *modif, void (*pr)(const char *, ...))
 {
 #ifndef DDB_TRACE
        struct pcb *pcb;
@@ -234,21 +230,19 @@
 }
 
 void
-db_mips_stack_trace(count, stackp, the_pc, the_ra, flags, kstackp)
-       int count;
-       vaddr_t stackp, the_pc, the_ra;
-       int flags;
-       vaddr_t kstackp;
+db_mips_stack_trace(int count, vaddr_t stackp, vaddr_t the_pc, vaddr_t the_ra,
+    int flags, vaddr_t kstackp)
 {
-       return;
+
+       /* nothing... */
 }
 
 
 int
-db_mips_variable_func (const struct db_variable *vp,
-       db_expr_t *valuep,
-       int db_var_fcn)
+db_mips_variable_func (const struct db_variable *vp, db_expr_t *valuep,
+    int db_var_fcn)
 {
+
        switch (db_var_fcn) {
        case DB_VAR_GET:
                *valuep = *(mips_reg_t *) vp->valuep;



Home | Main Index | Thread Index | Old Index