diff options
author | Thomas Schwinge <tschwinge@gnu.org> | 2007-04-30 20:30:11 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:27:09 +0200 |
commit | bc85b8639e6a4f3133d8bf10161a5947dfb5b29d (patch) | |
tree | 5f981ababb0bb14005efb9f1eba00cf9dad741ed /ddb | |
parent | 7f320586e5b3c2017b9ddd70bf97ac64f51f1be4 (diff) |
2007-04-30 Thomas Schwinge <tschwinge@gnu.org>
We're not in the eighties anymore. List arguments in function
prototypes and definitions for a lot of symbols. Also drop some unused
prototypes. I refrain from listing every changed symbol.
* chips/busses.h: Do as described.
* ddb/db_break.c: Likewise.
* ddb/db_break.h: Likewise.
* ddb/db_command.c: Likewise.
* ddb/db_command.h: Likewise.
* ddb/db_lex.c: Likewise.
* ddb/db_lex.h: Likewise.
* ddb/db_output.c: Likewise.
* ddb/db_output.h: Likewise.
* ddb/db_sym.h: Likewise.
* ddb/db_task_thread.c: Likewise.
* ddb/db_task_thread.h: Likewise.
* ddb/db_variables.h: Likewise.
* ddb/db_watch.c: Likewise.
* ddb/db_watch.h: Likewise.
* device/buf.h: Likewise.
* device/conf.h: Likewise.
* device/dev_hdr.h: Likewise.
* device/ds_routines.h: Likewise.
* device/if_ether.h: Likewise.
* device/io_req.h: Likewise.
* device/net_io.h: Likewise.
* i386/i386/io_port.h: Likewise.
* i386/i386/lock.h: Likewise.
* i386/i386/mp_desc.c: Likewise.
* i386/i386/mp_desc.h: Likewise.
* i386/i386/proc_reg.h: Likewise.
* i386/i386/user_ldt.h: Likewise.
* i386/i386at/kd_queue.h: Likewise.
* i386/i386at/kdsoft.h: Likewise.
* i386/intel/pmap.c: Likewise.
* i386/intel/pmap.h: Likewise.
* include/mach/mach_traps.h: Likewise.
* ipc/ipc_entry.h: Likewise.
* ipc/ipc_hash.h: Likewise.
* ipc/ipc_kmsg.h: Likewise.
* ipc/ipc_marequest.c: Likewise.
* ipc/ipc_marequest.h: Likewise.
* ipc/ipc_mqueue.h: Likewise.
* ipc/ipc_notify.h: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_port.h: Likewise.
* ipc/ipc_pset.h: Likewise.
* ipc/ipc_right.h: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/ipc_table.h: Likewise.
* ipc/mach_msg.c: Likewise.
* ipc/mach_msg.h: Likewise.
* kern/ast.c: Likewise.
* kern/ast.h: Likewise.
* kern/debug.c: Likewise.
* kern/debug.h: Likewise.
* kern/ipc_tt.c: Likewise.
* kern/ipc_tt.h: Likewise.
* kern/mach_factor.c: Likewise.
* kern/mach_factor.h: Likewise.
* kern/printf.c: Likewise.
* kern/printf.h: Likewise.
* kern/queue.h: Likewise.
* kern/sched.h: Likewise.
* kern/syscall_subr.c: Likewise.
* kern/syscall_subr.h: Likewise.
* kern/task.h: Likewise.
* kern/thread_swap.c: Likewise.
* kern/thread_swap.h: Likewise.
* kern/timer.h: Likewise.
* kern/xpr.c: Likewise.
* kern/xpr.h: Likewise.
* kern/zalloc.c: Likewise.
* kern/zalloc.h: Likewise.
* ipc/ipc_port.h: Don't include <ipc/ipc_space.h>.
* device/net_io.h: Include <device/if_hdr.h> and <device/io_req.h>.
* ipc/ipc_entry.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
* ipc/ipc_kmsg.h: Include <ipc/ipc_object.h>, <ipc/ipc_types.h> and
<vm/vm_map.h>.
* ipc/ipc_marequest.h: Include <mach_debug/hash_info.h> and
<ipc/ipc_types.h>.
* ipc/ipc_object.h: Include <ipc/ipc_types.h>.
* ipc/ipc_right.h: Include <ipc/ipc_entry.h>.
* ipc/ipc_space.h: Include <mach/mach_types.h> and <ipc/ipc_types.h>.
* kern/ipc_tt.h: Include <mach/mach_types.h>.
* kern/sched.h: Include <kern/kern_types.h>.
* ipc/ipc_hash.c (ipc_hash_index_t): Move type definition...
* ipc/ipc_hash.h: ... into here.
Diffstat (limited to 'ddb')
-rw-r--r-- | ddb/db_break.c | 4 | ||||
-rw-r--r-- | ddb/db_break.h | 4 | ||||
-rw-r--r-- | ddb/db_command.c | 2 | ||||
-rw-r--r-- | ddb/db_command.h | 7 | ||||
-rw-r--r-- | ddb/db_lex.c | 12 | ||||
-rw-r--r-- | ddb/db_lex.h | 24 | ||||
-rw-r--r-- | ddb/db_output.c | 6 | ||||
-rw-r--r-- | ddb/db_output.h | 6 | ||||
-rw-r--r-- | ddb/db_sym.h | 22 | ||||
-rw-r--r-- | ddb/db_task_thread.c | 2 | ||||
-rw-r--r-- | ddb/db_task_thread.h | 12 | ||||
-rw-r--r-- | ddb/db_variables.h | 7 | ||||
-rw-r--r-- | ddb/db_watch.c | 6 | ||||
-rw-r--r-- | ddb/db_watch.h | 16 |
14 files changed, 65 insertions, 65 deletions
diff --git a/ddb/db_break.c b/ddb/db_break.c index f07e2cc..c8e12f5 100644 --- a/ddb/db_break.c +++ b/ddb/db_break.c @@ -384,7 +384,7 @@ db_find_breakpoint_here(task, addr) boolean_t db_breakpoints_inserted = TRUE; void -db_set_breakpoints() +db_set_breakpoints(void) { register db_breakpoint_t bkpt; register task_t task; @@ -429,7 +429,7 @@ db_set_breakpoints() } void -db_clear_breakpoints() +db_clear_breakpoints(void) { register db_breakpoint_t bkpt, *bkptp; register task_t task; diff --git a/ddb/db_break.h b/ddb/db_break.h index 5909a62..ec7d880 100644 --- a/ddb/db_break.h +++ b/ddb/db_break.h @@ -72,8 +72,8 @@ typedef struct db_breakpoint *db_breakpoint_t; extern db_breakpoint_t db_find_breakpoint( task_t task, db_addr_t addr); extern boolean_t db_find_breakpoint_here( task_t task, db_addr_t addr); -extern void db_set_breakpoints(); -extern void db_clear_breakpoints(); +extern void db_set_breakpoints(void); +extern void db_clear_breakpoints(void); extern db_thread_breakpoint_t db_find_thread_breakpoint_here ( task_t task, db_addr_t addr ); extern db_thread_breakpoint_t db_find_breakpoint_number diff --git a/ddb/db_command.c b/ddb/db_command.c index ec46ba4..1593e86 100644 --- a/ddb/db_command.c +++ b/ddb/db_command.c @@ -419,7 +419,7 @@ db_help_cmd() int (*ddb_display)(); void -db_command_loop() +db_command_loop(void) { jmp_buf_t db_jmpbuf; jmp_buf_t *prev = db_recover; diff --git a/ddb/db_command.h b/ddb/db_command.h index 7870baa..1c0d106 100644 --- a/ddb/db_command.h +++ b/ddb/db_command.h @@ -37,11 +37,10 @@ #include <machine/db_machdep.h> #include <machine/setjmp.h> -extern void db_command_loop(); -extern boolean_t db_exec_conditional_cmd(); -extern boolean_t db_option(/* char *, int */); +extern void db_command_loop(void); +extern boolean_t db_option(char *, int); -extern void db_error(/* char * */); /* report error */ +extern void db_error(char *); /* report error */ extern db_addr_t db_dot; /* current location */ extern db_addr_t db_last_addr; /* last explicit address typed */ diff --git a/ddb/db_lex.c b/ddb/db_lex.c index 88ac212..ebffe06 100644 --- a/ddb/db_lex.c +++ b/ddb/db_lex.c @@ -74,7 +74,7 @@ db_read_line(repeat_last) } void -db_flush_line() +db_flush_line(void) { db_lp = db_line; db_last_lp = db_lp; @@ -115,7 +115,7 @@ db_restore_lex_context(lp) } int -db_read_char() +db_read_char(void) { int c; @@ -145,7 +145,7 @@ db_unread_token(t) } int -db_read_token() +db_read_token(void) { int t; @@ -167,7 +167,7 @@ char db_tok_string[TOK_STRING_SIZE]; db_expr_t db_radix = 16; void -db_flush_lex() +db_flush_lex(void) { db_flush_line(); db_look_char = 0; @@ -177,7 +177,7 @@ db_flush_lex() #define DB_DISP_SKIP 40 /* number of chars to display skip */ void -db_skip_to_eol() +db_skip_to_eol(void) { register int skip; register int t; @@ -203,7 +203,7 @@ db_skip_to_eol() } int -db_lex() +db_lex(void) { register char *cp; register int c; diff --git a/ddb/db_lex.h b/ddb/db_lex.h index 3cb9ae6..dc9da0a 100644 --- a/ddb/db_lex.h +++ b/ddb/db_lex.h @@ -41,18 +41,18 @@ struct db_lex_context { char *l_eptr; /* line end pointer */ }; -extern int db_lex(); -extern int db_read_line(/* char *rep_str */); -extern void db_flush_line(); -extern int db_read_char(); -extern void db_unread_char(/* char c */); -extern int db_read_token(); -extern void db_unread_token(/* int t */); -extern void db_flush_lex(); -extern void db_switch_input(/* char *, int */); -extern void db_save_lex_context(/* struct db_lex_context * */); -extern void db_restore_lex_context(/* struct db_lex_context * */); -extern void db_skip_to_eol(); +extern int db_lex(void); +extern int db_read_line(char *rep_str); +extern void db_flush_line(void); +extern int db_read_char(void); +extern void db_unread_char(int c); +extern int db_read_token(void); +extern void db_unread_token(int t); +extern void db_flush_lex(void); +extern void db_switch_input(char *, int); +extern void db_save_lex_context(struct db_lex_context *); +extern void db_restore_lex_context(struct db_lex_context *); +extern void db_skip_to_eol(void); extern db_expr_t db_tok_number; extern char db_tok_string[TOK_STRING_SIZE]; diff --git a/ddb/db_output.c b/ddb/db_output.c index 44a71ab..57d6856 100644 --- a/ddb/db_output.c +++ b/ddb/db_output.c @@ -79,7 +79,7 @@ extern void db_check_interrupt(); * Force pending whitespace. */ void -db_force_whitespace() +db_force_whitespace(void) { register int last_print, next_tab; @@ -189,7 +189,7 @@ db_id_putc(char c, vm_offset_t dummy) * Return output position */ int -db_print_position() +db_print_position(void) { return (db_output_position); } @@ -197,7 +197,7 @@ db_print_position() /* * End line if too long. */ -void db_end_line() +void db_end_line(void) { if (db_output_position >= db_max_width-1) db_printf("\n"); diff --git a/ddb/db_output.h b/ddb/db_output.h index 6667d19..3203e30 100644 --- a/ddb/db_output.h +++ b/ddb/db_output.h @@ -32,9 +32,9 @@ * Printing routines for kernel debugger. */ -extern void db_force_whitespace(); -extern int db_print_position(); -extern void db_end_line(); +extern void db_force_whitespace(void); +extern int db_print_position(void); +extern void db_end_line(void); extern void db_printf( const char *fmt, ...); extern void db_putchar(int c); diff --git a/ddb/db_sym.h b/ddb/db_sym.h index c2d5fec..216e327 100644 --- a/ddb/db_sym.h +++ b/ddb/db_sym.h @@ -150,42 +150,41 @@ extern void db_printsym( db_expr_t off, db_strategy_t strategy); /* * Symbol table switch, defines the interface * to symbol-table specific routines. - * [NOTE: incomplete prototypes cuz broken compiler] */ extern struct db_sym_switch { boolean_t (*init)( -/* char *start, + char *start, char *end, char *name, char *task_addr -*/ ); + ); db_sym_t (*lookup)( -/* db_symtab_t *stab, + db_symtab_t *stab, char *symstr -*/ ); + ); db_sym_t (*search_symbol)( -/* db_symtab_t *stab, + db_symtab_t *stab, db_addr_t off, db_strategy_t strategy, db_expr_t *diffp -*/ ); + ); boolean_t (*line_at_pc)( -/* db_symtab_t *stab, + db_symtab_t *stab, db_sym_t sym, char **file, int *line, db_expr_t pc -*/ ); + ); void (*symbol_values)( -/* db_sym_t sym, + db_sym_t sym, char **namep, db_expr_t *valuep -*/ ); + ); } x_db[]; @@ -204,4 +203,3 @@ extern boolean_t db_line_at_pc( char **filename, int *linenum, db_expr_t pc); - diff --git a/ddb/db_task_thread.c b/ddb/db_task_thread.c index ba101fb..3762942 100644 --- a/ddb/db_task_thread.c +++ b/ddb/db_task_thread.c @@ -231,7 +231,7 @@ db_get_next_thread(threadp, position) * ( it is called in entering DDB session ) */ void -db_init_default_thread() +db_init_default_thread(void) { if (db_lookup_thread(db_default_thread) < 0) { db_default_thread = THREAD_NULL; diff --git a/ddb/db_task_thread.h b/ddb/db_task_thread.h index 867cee6..ebf99d8 100644 --- a/ddb/db_task_thread.h +++ b/ddb/db_task_thread.h @@ -41,11 +41,11 @@ extern task_t db_default_task; /* default target task */ extern thread_t db_default_thread; /* default target thread */ -extern int db_lookup_task(/* task_t */); -extern int db_lookup_thread(/* thread_t */); -extern int db_lookup_task_thread(/* task_t, thread_t */); -extern boolean_t db_check_thread_address_valid(/* db_expr_t */); -extern boolean_t db_get_next_thread(/* thread_t *, int */); -extern void db_init_default_thread(); +extern int db_lookup_task(task_t); +extern int db_lookup_thread(thread_t); +extern int db_lookup_task_thread(task_t, thread_t); +extern boolean_t db_check_thread_address_valid(thread_t); +extern boolean_t db_get_next_thread(thread_t *, int); +extern void db_init_default_thread(void); #endif /* _DDB_DB_TASK_THREAD_H_ */ diff --git a/ddb/db_variables.h b/ddb/db_variables.h index b340c3d..c01a5e2 100644 --- a/ddb/db_variables.h +++ b/ddb/db_variables.h @@ -36,11 +36,13 @@ /* * Debugger variables. */ +struct db_var_aux_param; /* forward */ +typedef struct db_var_aux_param *db_var_aux_param_t; /* forward */ struct db_variable { char *name; /* Name of variable */ db_expr_t *valuep; /* pointer to value of variable */ /* function to call when reading/writing */ - int (*fcn)(/* db_variable, db_expr_t, int, db_var_aux_param_t */); + int (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t); short min_level; /* number of minimum suffix levels */ short max_level; /* number of maximum suffix levels */ short low; /* low value of level 1 suffix */ @@ -67,7 +69,8 @@ struct db_var_aux_param { thread_t thread; /* target task */ }; -typedef struct db_var_aux_param *db_var_aux_param_t; +/* Already defined above. */ +/* typedef struct db_var_aux_param *db_var_aux_param_t; */ extern struct db_variable db_vars[]; /* debugger variables */ diff --git a/ddb/db_watch.c b/ddb/db_watch.c index 4450676..072f474 100644 --- a/ddb/db_watch.c +++ b/ddb/db_watch.c @@ -150,7 +150,7 @@ db_delete_watchpoint(task, addr) } void -db_list_watchpoints() +db_list_watchpoints(void) { register db_watchpoint_t watch; int task_id; @@ -260,7 +260,7 @@ db_listwatch_cmd() } void -db_set_watchpoints() +db_set_watchpoints(void) { register db_watchpoint_t watch; vm_map_t map; @@ -278,7 +278,7 @@ db_set_watchpoints() } void -db_clear_watchpoints() +db_clear_watchpoints(void) { db_watchpoints_inserted = FALSE; } diff --git a/ddb/db_watch.h b/ddb/db_watch.h index 2fb79fa..a7acb39 100644 --- a/ddb/db_watch.h +++ b/ddb/db_watch.h @@ -48,14 +48,14 @@ typedef struct db_watchpoint { struct db_watchpoint *link; /* link in in-use or free chain */ } *db_watchpoint_t; -extern boolean_t db_find_watchpoint(/* task_t task, db_addr_t addr, - db_regs_t *regs */); -extern void db_set_watchpoints(); -extern void db_clear_watchpoints(); - -extern void db_set_watchpoint(/* task_t task, db_addr_t addr, vm_size_t size */); -extern void db_delete_watchpoint(/* task_t task, db_addr_t addr */); -extern void db_list_watchpoints(); +extern boolean_t db_find_watchpoint(vm_map_t map, db_addr_t addr, + db_regs_t *regs); +extern void db_set_watchpoints(void); +extern void db_clear_watchpoints(void); + +extern void db_set_watchpoint(task_t task, db_addr_t addr, vm_size_t size); +extern void db_delete_watchpoint(task_t task, db_addr_t addr); +extern void db_list_watchpoints(void); #endif /* _DDB_DB_WATCH_ */ |