summaryrefslogtreecommitdiff
path: root/ddb
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2014-04-04 22:32:14 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-04-04 22:32:52 +0200
commitfe0231ba14d8597b0d78bf6121dd15a82bbab34a (patch)
tree0a2c3e1db9d4aa148248c5a8cb3277cc41cd2c11 /ddb
parent2aa14940b85cd3a38eff6ad4471ebf40a0074cb2 (diff)
Convert from K&R to ANSI
Convert from K&R style function definitions to ANSI style function definitions. * ddb/db_access.c: Convert function prototypes from K&R to ANSI. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * device/blkio.c: Likewise. * device/chario.c: Likewise. * device/dev_lookup.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/loose_ends.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/phys.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/user_ldt.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/kd_queue.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/rtc.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/read_fault.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/exception.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/printf.c: Likewise. * kern/priority.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_emulation.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread_swap.c: Likewise. * kern/time_stamp.c: Likewise. * kern/timer.c: Likewise. * kern/xpr.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_user.c: Likewise.
Diffstat (limited to 'ddb')
-rw-r--r--ddb/db_access.c36
-rw-r--r--ddb/db_aout.c36
-rw-r--r--ddb/db_break.c32
-rw-r--r--ddb/db_command.c21
-rw-r--r--ddb/db_cond.c6
-rw-r--r--ddb/db_examine.c30
-rw-r--r--ddb/db_expr.c28
-rw-r--r--ddb/db_ext_symtab.c12
-rw-r--r--ddb/db_input.c15
-rw-r--r--ddb/db_lex.c15
-rw-r--r--ddb/db_macro.c10
-rw-r--r--ddb/db_mp.c3
-rw-r--r--ddb/db_output.c3
-rw-r--r--ddb/db_print.c32
-rw-r--r--ddb/db_run.c24
-rw-r--r--ddb/db_sym.c64
-rw-r--r--ddb/db_task_thread.c25
-rw-r--r--ddb/db_trap.c12
-rw-r--r--ddb/db_variables.c22
-rw-r--r--ddb/db_watch.c8
20 files changed, 206 insertions, 228 deletions
diff --git a/ddb/db_access.c b/ddb/db_access.c
index 4df9831..16d4d3e 100644
--- a/ddb/db_access.c
+++ b/ddb/db_access.c
@@ -62,11 +62,11 @@ static int db_extend[sizeof(int)+1] = { /* table for sign-extending */
};
db_expr_t
-db_get_task_value(addr, size, is_signed, task)
- db_addr_t addr;
- int size;
- boolean_t is_signed;
- task_t task;
+db_get_task_value(
+ db_addr_t addr,
+ int size,
+ boolean_t is_signed,
+ task_t task)
{
char data[sizeof(db_expr_t)];
db_expr_t value;
@@ -92,11 +92,11 @@ db_get_task_value(addr, size, is_signed, task)
}
void
-db_put_task_value(addr, size, value, task)
- db_addr_t addr;
- int size;
- db_expr_t value;
- task_t task;
+db_put_task_value(
+ db_addr_t addr,
+ int size,
+ db_expr_t value,
+ task_t task)
{
char data[sizeof(db_expr_t)];
int i;
@@ -115,19 +115,19 @@ db_put_task_value(addr, size, value, task)
}
db_expr_t
-db_get_value(addr, size, is_signed)
- db_addr_t addr;
- int size;
- boolean_t is_signed;
+db_get_value(
+ db_addr_t addr,
+ int size,
+ boolean_t is_signed)
{
return(db_get_task_value(addr, size, is_signed, TASK_NULL));
}
void
-db_put_value(addr, size, value)
- db_addr_t addr;
- int size;
- db_expr_t value;
+db_put_value(
+ db_addr_t addr,
+ int size,
+ db_expr_t value)
{
db_put_task_value(addr, size, value, TASK_NULL);
}
diff --git a/ddb/db_aout.c b/ddb/db_aout.c
index 87ba975..d3f2e31 100644
--- a/ddb/db_aout.c
+++ b/ddb/db_aout.c
@@ -70,13 +70,13 @@
ep = (struct nlist *)((char *)sp + *((int*)symtab)))
boolean_t
-aout_db_sym_init(symtab, esymtab, name, task_addr)
- char * symtab; /* pointer to start of symbol table */
- char * esymtab; /* pointer to end of string table,
+aout_db_sym_init(
+ char * symtab, /* pointer to start of symbol table */
+ char * esymtab, /* pointer to end of string table,
for checking - may be rounded up to
integer boundary */
- char * name;
- char * task_addr; /* use for this task only */
+ char * name,
+ char * task_addr) /* use for this task only */
{
struct nlist *sym_start, *sym_end;
struct nlist *sp;
@@ -313,19 +313,19 @@ aout_db_qualified_search(stab, file, sym, line)
* lookup symbol by name
*/
db_sym_t
-aout_db_lookup(stab, symstr)
- db_symtab_t *stab;
- char * symstr;
+aout_db_lookup(
+ db_symtab_t *stab,
+ char * symstr)
{
return(db_sym_parse_and_lookup(aout_db_qualified_search, stab, symstr));
}
db_sym_t
-aout_db_search_symbol(symtab, off, strategy, diffp)
- db_symtab_t * symtab;
- db_addr_t off;
- db_strategy_t strategy;
- db_expr_t *diffp; /* in/out */
+aout_db_search_symbol(
+ db_symtab_t * symtab,
+ db_addr_t off,
+ db_strategy_t strategy,
+ db_expr_t *diffp) /* in/out */
{
unsigned long diff = *diffp;
struct nlist *symp = 0;
@@ -374,11 +374,11 @@ aout_db_search_symbol(symtab, off, strategy, diffp)
* Return the name and value for a symbol.
*/
void
-aout_db_symbol_values(stab, sym, namep, valuep)
- db_symtab_t *stab;
- db_sym_t sym;
- char **namep;
- db_expr_t *valuep;
+aout_db_symbol_values(
+ db_symtab_t *stab,
+ db_sym_t sym,
+ char **namep,
+ db_expr_t *valuep)
{
struct nlist *sp;
diff --git a/ddb/db_break.c b/ddb/db_break.c
index 0534f68..c3a9e18 100644
--- a/ddb/db_break.c
+++ b/ddb/db_break.c
@@ -121,9 +121,9 @@ db_add_thread_breakpoint(bkpt, task_thd, count, task_bpt)
}
static int
-db_delete_thread_breakpoint(bkpt, task_thd)
- db_breakpoint_t bkpt;
- vm_offset_t task_thd;
+db_delete_thread_breakpoint(
+ db_breakpoint_t bkpt,
+ vm_offset_t task_thd)
{
db_thread_breakpoint_t tp;
db_thread_breakpoint_t *tpp;
@@ -188,9 +188,9 @@ db_find_thread_breakpoint_here(task, addr)
}
db_thread_breakpoint_t
-db_find_breakpoint_number(num, bkptp)
- int num;
- db_breakpoint_t *bkptp;
+db_find_breakpoint_number(
+ int num,
+ db_breakpoint_t *bkptp)
{
db_thread_breakpoint_t tp;
db_breakpoint_t bkpt;
@@ -208,10 +208,10 @@ db_find_breakpoint_number(num, bkptp)
}
static void
-db_force_delete_breakpoint(bkpt, task_thd, is_task)
- db_breakpoint_t bkpt;
- vm_offset_t task_thd;
- boolean_t is_task;
+db_force_delete_breakpoint(
+ db_breakpoint_t bkpt,
+ vm_offset_t task_thd,
+ boolean_t is_task)
{
db_printf("deleted a stale breakpoint at ");
if (bkpt->task == TASK_NULL || db_lookup_task(bkpt->task) >= 0)
@@ -482,9 +482,9 @@ db_clear_breakpoints(void)
* so the breakpoint does not have to be on the breakpoint list.
*/
db_breakpoint_t
-db_set_temp_breakpoint(task, addr)
- task_t task;
- db_addr_t addr;
+db_set_temp_breakpoint(
+ task_t task,
+ db_addr_t addr)
{
db_breakpoint_t bkpt;
@@ -511,9 +511,9 @@ db_set_temp_breakpoint(task, addr)
}
void
-db_delete_temp_breakpoint(task, bkpt)
- task_t task;
- db_breakpoint_t bkpt;
+db_delete_temp_breakpoint(
+ task_t task,
+ db_breakpoint_t bkpt)
{
db_put_task_value(bkpt->address, BKPT_SIZE, bkpt->bkpt_inst, task);
db_delete_thread_breakpoint(bkpt, 0);
diff --git a/ddb/db_command.c b/ddb/db_command.c
index 3879ec5..ebb13df 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -153,9 +153,9 @@ db_cmd_list(table)
}
void
-db_command(last_cmdp, cmd_table)
- struct db_command **last_cmdp; /* IN_OUT */
- struct db_command *cmd_table;
+db_command(
+ struct db_command **last_cmdp, /* IN_OUT */
+ struct db_command *cmd_table)
{
struct db_command *cmd;
int t;
@@ -293,9 +293,9 @@ db_command(last_cmdp, cmd_table)
}
void
-db_command_list(last_cmdp, cmd_table)
- struct db_command **last_cmdp; /* IN_OUT */
- struct db_command *cmd_table;
+db_command_list(
+ struct db_command **last_cmdp, /* IN_OUT */
+ struct db_command *cmd_table)
{
do {
db_command(last_cmdp, cmd_table);
@@ -370,8 +370,7 @@ struct db_command db_command_table[] = {
/* this function should be called to install the machine dependent
commands. It should be called before the debugger is enabled */
-void db_machine_commands_install(ptr)
-struct db_command *ptr;
+void db_machine_commands_install(struct db_command *ptr)
{
db_command_table[0].more = ptr;
return;
@@ -429,9 +428,9 @@ db_command_loop(void)
}
boolean_t
-db_exec_cmd_nest(cmd, size)
- char *cmd;
- int size;
+db_exec_cmd_nest(
+ char *cmd,
+ int size)
{
struct db_lex_context lex_context;
diff --git a/ddb/db_cond.c b/ddb/db_cond.c
index 2c923b4..31e1d24 100644
--- a/ddb/db_cond.c
+++ b/ddb/db_cond.c
@@ -48,8 +48,7 @@ struct db_cond {
} db_cond[DB_MAX_COND];
void
-db_cond_free(bkpt)
- db_thread_breakpoint_t bkpt;
+db_cond_free(db_thread_breakpoint_t bkpt)
{
if (bkpt->tb_cond > 0) {
db_cond[bkpt->tb_cond-1].c_size = 0;
@@ -59,8 +58,7 @@ db_cond_free(bkpt)
}
boolean_t
-db_cond_check(bkpt)
- db_thread_breakpoint_t bkpt;
+db_cond_check(db_thread_breakpoint_t bkpt)
{
struct db_cond *cp;
db_expr_t value;
diff --git a/ddb/db_examine.c b/ddb/db_examine.c
index cb103ae..836b0e8 100644
--- a/ddb/db_examine.c
+++ b/ddb/db_examine.c
@@ -321,9 +321,9 @@ db_print_cmd(void)
}
void
-db_print_loc_and_inst(loc, task)
- db_addr_t loc;
- task_t task;
+db_print_loc_and_inst(
+ db_addr_t loc,
+ task_t task)
{
db_task_printsym(loc, DB_STGY_PROC, task);
db_printf(":\t");
@@ -425,13 +425,13 @@ db_search_cmd(void)
}
void
-db_search(addr, size, value, mask, count, task)
- db_addr_t addr;
- int size;
- db_expr_t value;
- db_expr_t mask;
- unsigned int count;
- task_t task;
+db_search(
+ db_addr_t addr,
+ int size,
+ db_expr_t value,
+ db_expr_t mask,
+ unsigned int count,
+ task_t task)
{
while (count-- != 0) {
db_prev = addr;
@@ -445,11 +445,11 @@ db_search(addr, size, value, mask, count, task)
#define DB_XCDUMP_NC 16
int
-db_xcdump(addr, size, count, task)
- db_addr_t addr;
- int size;
- int count;
- task_t task;
+db_xcdump(
+ db_addr_t addr,
+ int size,
+ int count,
+ task_t task)
{
int i, n;
db_expr_t value;
diff --git a/ddb/db_expr.c b/ddb/db_expr.c
index dad09e5..c9e6752 100644
--- a/ddb/db_expr.c
+++ b/ddb/db_expr.c
@@ -41,10 +41,8 @@
#include <ddb/db_variables.h>
#include <kern/task.h>
-
boolean_t
-db_term(valuep)
- db_expr_t *valuep;
+db_term(db_expr_t *valuep)
{
int t;
@@ -127,8 +125,7 @@ db_size_option(modif, u_option, t_option)
}
boolean_t
-db_unary(valuep)
- db_expr_t *valuep;
+db_unary(db_expr_t *valuep)
{
int t;
int size;
@@ -177,8 +174,7 @@ db_unary(valuep)
}
boolean_t
-db_mult_expr(valuep)
- db_expr_t *valuep;
+db_mult_expr(db_expr_t *valuep)
{
db_expr_t lhs = 0, rhs;
int t;
@@ -223,8 +219,7 @@ db_mult_expr(valuep)
}
boolean_t
-db_add_expr(valuep)
- db_expr_t *valuep;
+db_add_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
@@ -255,8 +250,7 @@ db_add_expr(valuep)
}
boolean_t
-db_shift_expr(valuep)
- db_expr_t *valuep;
+db_shift_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
@@ -290,8 +284,7 @@ db_shift_expr(valuep)
}
boolean_t
-db_logical_relation_expr(valuep)
- db_expr_t *valuep;
+db_logical_relation_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
@@ -340,8 +333,7 @@ db_logical_relation_expr(valuep)
}
boolean_t
-db_logical_and_expr(valuep)
- db_expr_t *valuep;
+db_logical_and_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
@@ -363,8 +355,7 @@ db_logical_and_expr(valuep)
}
boolean_t
-db_logical_or_expr(valuep)
- db_expr_t *valuep;
+db_logical_or_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
@@ -386,8 +377,7 @@ db_logical_or_expr(valuep)
}
int
-db_expression(valuep)
- db_expr_t *valuep;
+db_expression(db_expr_t *valuep)
{
return (db_logical_or_expr(valuep));
}
diff --git a/ddb/db_ext_symtab.c b/ddb/db_ext_symtab.c
index 9831a01..cafb0c4 100644
--- a/ddb/db_ext_symtab.c
+++ b/ddb/db_ext_symtab.c
@@ -46,12 +46,12 @@
* the caller and the kernel debugger agree on its format.
*/
kern_return_t
-host_load_symbol_table(host, task, name, symtab, symtab_count)
- host_t host;
- task_t task;
- char * name;
- pointer_t symtab;
- unsigned int symtab_count;
+host_load_symbol_table(
+ host_t host,
+ task_t task,
+ char * name,
+ pointer_t symtab,
+ unsigned int symtab_count)
{
kern_return_t result;
vm_offset_t symtab_start;
diff --git a/ddb/db_input.c b/ddb/db_input.c
index f908705..6b6db76 100644
--- a/ddb/db_input.c
+++ b/ddb/db_input.c
@@ -91,9 +91,9 @@ db_putnchars(c, count)
#define DEL_FWD 0
#define DEL_BWD 1
void
-db_delete(n, bwd)
- int n;
- int bwd;
+db_delete(
+ int n,
+ int bwd)
{
char *p;
@@ -137,8 +137,7 @@ db_delete_line(void)
/* returns TRUE at end-of-line */
boolean_t
-db_inputchar(c)
- int c;
+db_inputchar(int c)
{
switch (c) {
case CTRL('b'):
@@ -328,9 +327,9 @@ db_inputchar(c)
}
int
-db_readline(lstart, lsize)
- char * lstart;
- int lsize;
+db_readline(
+ char * lstart,
+ int lsize)
{
db_force_whitespace(); /* synch output position */
diff --git a/ddb/db_lex.c b/ddb/db_lex.c
index e7f67d2..8ab6910 100644
--- a/ddb/db_lex.c
+++ b/ddb/db_lex.c
@@ -82,9 +82,9 @@ db_flush_line(void)
}
void
-db_switch_input(buffer, size)
- char *buffer;
- int size;
+db_switch_input(
+ char *buffer,
+ int size)
{
db_lp = buffer;
db_last_lp = db_lp;
@@ -94,8 +94,7 @@ db_switch_input(buffer, size)
}
void
-db_save_lex_context(lp)
- struct db_lex_context *lp;
+db_save_lex_context(struct db_lex_context *lp)
{
lp->l_ptr = db_lp;
lp->l_eptr = db_endlp;
@@ -131,15 +130,13 @@ db_read_char(void)
}
void
-db_unread_char(c)
- int c;
+db_unread_char(int c)
{
db_look_char = c;
}
void
-db_unread_token(t)
- int t;
+db_unread_token(int t)
{
db_look_token = t;
}
diff --git a/ddb/db_macro.c b/ddb/db_macro.c
index e22f6bf..307b7c5 100644
--- a/ddb/db_macro.c
+++ b/ddb/db_macro.c
@@ -167,11 +167,11 @@ db_exec_macro(name)
void
/* ARGSUSED */
-db_arg_variable(vp, valuep, flag, ap)
- struct db_variable *vp;
- db_expr_t *valuep;
- int flag;
- db_var_aux_param_t ap;
+db_arg_variable(
+ struct db_variable *vp,
+ db_expr_t *valuep,
+ int flag,
+ db_var_aux_param_t ap)
{
if (ap->level != 1 || ap->suffix[0] < 1 || ap->suffix[0] > DB_NARGS) {
db_error("Bad $arg variable\n");
diff --git a/ddb/db_mp.c b/ddb/db_mp.c
index ae82c27..8d1a560 100644
--- a/ddb/db_mp.c
+++ b/ddb/db_mp.c
@@ -210,8 +210,7 @@ remote_db(void) {
* switch to another cpu
*/
void
-db_on(cpu)
- int cpu;
+db_on(int cpu)
{
/*
* Save ddb global variables
diff --git a/ddb/db_output.c b/ddb/db_output.c
index f2829cc..be5319d 100644
--- a/ddb/db_output.c
+++ b/ddb/db_output.c
@@ -132,8 +132,7 @@ db_more(void)
* Output character. Buffer whitespace.
*/
void
-db_putchar(c)
- int c; /* character to output */
+db_putchar(int c) /* character to output */
{
if (db_max_line >= DB_MIN_MAX_LINE && db_output_line >= db_max_line-1)
db_more();
diff --git a/ddb/db_print.c b/ddb/db_print.c
index 17ca2cc..c015d84 100644
--- a/ddb/db_print.c
+++ b/ddb/db_print.c
@@ -57,11 +57,11 @@ extern unsigned long db_maxoff;
/* ARGSUSED */
void
-db_show_regs(addr, have_addr, count, modif)
- db_expr_t addr;
- boolean_t have_addr;
- db_expr_t count;
- char *modif;
+db_show_regs(
+ db_expr_t addr,
+ boolean_t have_addr,
+ db_expr_t count,
+ char *modif)
{
struct db_variable *regp;
db_expr_t value;
@@ -144,10 +144,10 @@ db_thread_stat(thread, status)
}
void
-db_print_thread(thread, thread_id, flag)
- thread_t thread;
- int thread_id;
- int flag;
+db_print_thread(
+ thread_t thread,
+ int thread_id,
+ int flag)
{
if (flag & OPTION_USER) {
char status[8];
@@ -220,10 +220,10 @@ db_print_thread(thread, thread_id, flag)
}
void
-db_print_task(task, task_id, flag)
- task_t task;
- int task_id;
- int flag;
+db_print_task(
+ task_t task,
+ int task_id,
+ int flag)
{
thread_t thread;
int thread_id;
@@ -431,9 +431,9 @@ db_port_iterate(thread, func)
}
ipc_port_t
-db_lookup_port(thread, id)
- thread_t thread;
- int id;
+db_lookup_port(
+ thread_t thread,
+ int id)
{
ipc_space_t space;
ipc_entry_t entry;
diff --git a/ddb/db_run.c b/ddb/db_run.c
index 6e409ff..9b467fc 100644
--- a/ddb/db_run.c
+++ b/ddb/db_run.c
@@ -60,9 +60,9 @@ int db_load_count;
int db_store_count;
boolean_t
-db_stop_at_pc(is_breakpoint, task)
- boolean_t *is_breakpoint;
- task_t task;
+db_stop_at_pc(
+ boolean_t *is_breakpoint,
+ task_t task)
{
db_addr_t pc;
db_thread_breakpoint_t bkpt;
@@ -156,9 +156,9 @@ db_stop_at_pc(is_breakpoint, task)
}
void
-db_restart_at_pc(watchpt, task)
- boolean_t watchpt;
- task_t task;
+db_restart_at_pc(
+ boolean_t watchpt,
+ task_t task)
{
db_addr_t pc = PC_REGS(DDB_REGS);
@@ -206,9 +206,9 @@ db_restart_at_pc(watchpt, task)
}
void
-db_single_step(regs, task)
- db_regs_t *regs;
- task_t task;
+db_single_step(
+ db_regs_t *regs,
+ task_t task)
{
if (db_run_mode == STEP_CONTINUE) {
db_run_mode = STEP_INVISIBLE;
@@ -264,9 +264,9 @@ db_find_temp_breakpoint(task, addr)
}
void
-db_set_task_single_step(regs, task)
- db_regs_t *regs;
- task_t task;
+db_set_task_single_step(
+ db_regs_t *regs,
+ task_t task)
{
db_addr_t pc = PC_REGS(regs), brpc;
unsigned int inst;
diff --git a/ddb/db_sym.c b/ddb/db_sym.c
index 3c8caf4..7d97d15 100644
--- a/ddb/db_sym.c
+++ b/ddb/db_sym.c
@@ -55,13 +55,13 @@ db_symtab_t *db_last_symtab;
* Add symbol table, with given name, to list of symbol tables.
*/
boolean_t
-db_add_symbol_table(type, start, end, name, ref, map_pointer)
- int type;
- char *start;
- char *end;
- char *name;
- char *ref;
- char *map_pointer;
+db_add_symbol_table(
+ int type,
+ char *start,
+ char *end,
+ char *name,
+ char *ref,
+ char *map_pointer)
{
db_symtab_t *st;
extern vm_map_t kernel_map;
@@ -119,9 +119,9 @@ db_eqname( const char* src, const char* dst, char c )
}
boolean_t
-db_value_of_name(name, valuep)
- char *name;
- db_expr_t *valuep;
+db_value_of_name(
+ char *name,
+ db_expr_t *valuep)
{
db_sym_t sym;
@@ -141,8 +141,7 @@ db_value_of_name(name, valuep)
* otherwise, all symbol tables will be searched.
*/
db_sym_t
-db_lookup(symstr)
- char *symstr;
+db_lookup(char *symstr)
{
db_sym_t sp;
int i;
@@ -193,10 +192,10 @@ db_lookup(symstr)
* with parsed file name, symbol name and line number.
*/
db_sym_t
-db_sym_parse_and_lookup(func, symtab, symstr)
- db_sym_t (*func)();
- db_symtab_t *symtab;
- char *symstr;
+db_sym_parse_and_lookup(
+ db_sym_t (*func)(),
+ db_symtab_t *symtab,
+ char *symstr)
{
char *p;
int n;
@@ -265,8 +264,7 @@ out:
boolean_t db_qualify_ambiguous_names = FALSE;
boolean_t
-db_name_is_ambiguous(sym_name)
- char *sym_name;
+db_name_is_ambiguous(char *sym_name)
{
int i;
boolean_t found_once = FALSE;
@@ -301,11 +299,11 @@ db_name_is_ambiguous(sym_name)
*
*/
db_sym_t
-db_search_task_symbol(val, strategy, offp, task)
- db_addr_t val;
- db_strategy_t strategy;
- db_addr_t *offp; /* better be unsigned */
- task_t task;
+db_search_task_symbol(
+ db_addr_t val,
+ db_strategy_t strategy,
+ db_addr_t *offp, /* better be unsigned */
+ task_t task)
{
db_sym_t ret;
@@ -330,11 +328,11 @@ db_search_task_symbol(val, strategy, offp, task)
}
db_sym_t
-db_search_in_task_symbol(val, strategy, offp, task)
- db_addr_t val;
- db_strategy_t strategy;
- db_addr_t *offp;
- task_t task;
+db_search_in_task_symbol(
+ db_addr_t val,
+ db_strategy_t strategy,
+ db_addr_t *offp,
+ task_t task)
{
vm_size_t diff;
vm_size_t newdiff;
@@ -398,11 +396,11 @@ db_search_in_task_symbol(val, strategy, offp, task)
* Return name and value of a symbol
*/
void
-db_symbol_values(stab, sym, namep, valuep)
- db_symtab_t *stab;
- db_sym_t sym;
- char **namep;
- db_expr_t *valuep;
+db_symbol_values(
+ db_symtab_t *stab,
+ db_sym_t sym,
+ char **namep,
+ db_expr_t *valuep)
{
db_expr_t value;
char *name;
diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c
index 266b1ea..edab17e 100644
--- a/ddb/db_task_thread.c
+++ b/ddb/db_task_thread.c
@@ -153,8 +153,7 @@ db_check_thread_address_valid(thread)
* convert task_id(queue postion) to task address
*/
task_t
-db_lookup_task_id(task_id)
- int task_id;
+db_lookup_task_id(int task_id)
{
task_t task;
processor_set_t pset;
@@ -181,9 +180,9 @@ db_lookup_task_id(task_id)
* convert (task_id, thread_id) pair to thread address
*/
static thread_t
-db_lookup_thread_id(task, thread_id)
- task_t task;
- int thread_id;
+db_lookup_thread_id(
+ task_t task,
+ int thread_id)
{
thread_t thread;
@@ -204,9 +203,9 @@ db_lookup_thread_id(task, thread_id)
* thread address
*/
boolean_t
-db_get_next_thread(threadp, position)
- thread_t *threadp;
- int position;
+db_get_next_thread(
+ thread_t *threadp,
+ int position)
{
db_expr_t value;
thread_t thread;
@@ -272,11 +271,11 @@ db_set_default_thread(vp, valuep, flag, ap)
* convert $taskXXX[.YYY] type DDB variable to task or thread address
*/
void
-db_get_task_thread(vp, valuep, flag, ap)
- struct db_variable *vp;
- db_expr_t *valuep;
- int flag;
- db_var_aux_param_t ap;
+db_get_task_thread(
+ struct db_variable *vp,
+ db_expr_t *valuep,
+ int flag,
+ db_var_aux_param_t ap)
{
task_t task;
thread_t thread;
diff --git a/ddb/db_trap.c b/ddb/db_trap.c
index 28f64d1..b56ffdc 100644
--- a/ddb/db_trap.c
+++ b/ddb/db_trap.c
@@ -53,9 +53,10 @@ extern int db_load_count;
extern int db_store_count;
void
-db_task_trap(type, code, user_space)
- int type, code;
- boolean_t user_space;
+db_task_trap(
+ int type,
+ int code,
+ boolean_t user_space)
{
jmp_buf_t db_jmpbuf;
jmp_buf_t *prev;
@@ -96,8 +97,9 @@ db_task_trap(type, code, user_space)
}
void
-db_trap(type, code)
- int type, code;
+db_trap(
+ int type,
+ int code)
{
db_task_trap(type, code, !DB_VALID_KERN_ADDR(PC_REGS(DDB_REGS)));
}
diff --git a/ddb/db_variables.c b/ddb/db_variables.c
index 7f5a2c9..4442ccb 100644
--- a/ddb/db_variables.c
+++ b/ddb/db_variables.c
@@ -115,9 +115,9 @@ db_cmp_variable_name(vp, name, ap)
}
int
-db_find_variable(varp, ap)
- struct db_variable **varp;
- db_var_aux_param_t ap;
+db_find_variable(
+ struct db_variable **varp,
+ db_var_aux_param_t ap)
{
int t;
struct db_variable *vp;
@@ -143,8 +143,7 @@ db_find_variable(varp, ap)
}
int
-db_get_variable(valuep)
- db_expr_t *valuep;
+db_get_variable(db_expr_t *valuep)
{
struct db_variable *vp;
struct db_var_aux_param aux_param;
@@ -160,8 +159,7 @@ db_get_variable(valuep)
}
int
-db_set_variable(value)
- db_expr_t value;
+db_set_variable(db_expr_t value)
{
struct db_variable *vp;
struct db_var_aux_param aux_param;
@@ -177,11 +175,11 @@ db_set_variable(value)
}
void
-db_read_write_variable(vp, valuep, rw_flag, ap)
- struct db_variable *vp;
- db_expr_t *valuep;
- int rw_flag;
- db_var_aux_param_t ap;
+db_read_write_variable(
+ struct db_variable *vp,
+ db_expr_t *valuep,
+ int rw_flag,
+ db_var_aux_param_t ap)
{
void (*func)() = vp->fcn;
struct db_var_aux_param aux_param;
diff --git a/ddb/db_watch.c b/ddb/db_watch.c
index dbb4aea..f0d0443 100644
--- a/ddb/db_watch.c
+++ b/ddb/db_watch.c
@@ -294,10 +294,10 @@ db_clear_watchpoints(void)
}
boolean_t
-db_find_watchpoint(map, addr, regs)
- vm_map_t map;
- db_addr_t addr;
- db_regs_t *regs;
+db_find_watchpoint(
+ vm_map_t map,
+ db_addr_t addr,
+ db_regs_t *regs)
{
db_watchpoint_t watch;
db_watchpoint_t found = 0;