summaryrefslogtreecommitdiff
path: root/ddb
diff options
context:
space:
mode:
Diffstat (limited to 'ddb')
-rw-r--r--ddb/db_break.c4
-rw-r--r--ddb/db_break.h4
-rw-r--r--ddb/db_command.c2
-rw-r--r--ddb/db_command.h7
-rw-r--r--ddb/db_lex.c12
-rw-r--r--ddb/db_lex.h24
-rw-r--r--ddb/db_output.c6
-rw-r--r--ddb/db_output.h6
-rw-r--r--ddb/db_sym.h22
-rw-r--r--ddb/db_task_thread.c2
-rw-r--r--ddb/db_task_thread.h12
-rw-r--r--ddb/db_variables.h7
-rw-r--r--ddb/db_watch.c6
-rw-r--r--ddb/db_watch.h16
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_ */