ddb: ANSI-fy function declarations.
MFC after: 5 days
This commit is contained in:
parent
73e76bf94f
commit
e669b6bbab
@ -54,10 +54,7 @@ static unsigned db_extend[] = { /* table for sign-extending */
|
||||
#endif
|
||||
|
||||
db_expr_t
|
||||
db_get_value(addr, size, is_signed)
|
||||
db_addr_t addr;
|
||||
register int size;
|
||||
boolean_t is_signed;
|
||||
db_get_value(db_addr_t addr, int size, boolean_t is_signed)
|
||||
{
|
||||
char data[sizeof(u_int64_t)];
|
||||
register db_expr_t value;
|
||||
@ -87,10 +84,7 @@ db_get_value(addr, size, is_signed)
|
||||
}
|
||||
|
||||
void
|
||||
db_put_value(addr, size, value)
|
||||
db_addr_t addr;
|
||||
register int size;
|
||||
register db_expr_t value;
|
||||
db_put_value(db_addr_t addr, int size, db_expr_t value)
|
||||
{
|
||||
char data[sizeof(int)];
|
||||
register int i;
|
||||
|
@ -59,7 +59,7 @@ static void db_list_breakpoints(void);
|
||||
static void db_set_breakpoint(vm_map_t map, db_addr_t addr, int count);
|
||||
|
||||
static db_breakpoint_t
|
||||
db_breakpoint_alloc()
|
||||
db_breakpoint_alloc(void)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -78,18 +78,14 @@ db_breakpoint_alloc()
|
||||
}
|
||||
|
||||
static void
|
||||
db_breakpoint_free(bkpt)
|
||||
register db_breakpoint_t bkpt;
|
||||
db_breakpoint_free(db_breakpoint_t bkpt)
|
||||
{
|
||||
bkpt->link = db_free_breakpoints;
|
||||
db_free_breakpoints = bkpt;
|
||||
}
|
||||
|
||||
static void
|
||||
db_set_breakpoint(map, addr, count)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
int count;
|
||||
db_set_breakpoint(vm_map_t map, db_addr_t addr, int count)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -115,9 +111,7 @@ db_set_breakpoint(map, addr, count)
|
||||
}
|
||||
|
||||
static void
|
||||
db_delete_breakpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
db_delete_breakpoint(vm_map_t map, db_addr_t addr)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
register db_breakpoint_t *prev;
|
||||
@ -140,9 +134,7 @@ db_delete_breakpoint(map, addr)
|
||||
}
|
||||
|
||||
static db_breakpoint_t
|
||||
db_find_breakpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
db_find_breakpoint(vm_map_t map, db_addr_t addr)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -158,8 +150,7 @@ db_find_breakpoint(map, addr)
|
||||
}
|
||||
|
||||
db_breakpoint_t
|
||||
db_find_breakpoint_here(addr)
|
||||
db_addr_t addr;
|
||||
db_find_breakpoint_here(db_addr_t addr)
|
||||
{
|
||||
return db_find_breakpoint(db_map_addr(addr), addr);
|
||||
}
|
||||
@ -180,7 +171,7 @@ do { \
|
||||
#endif
|
||||
|
||||
void
|
||||
db_set_breakpoints()
|
||||
db_set_breakpoints(void)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -197,7 +188,7 @@ db_set_breakpoints()
|
||||
}
|
||||
|
||||
void
|
||||
db_clear_breakpoints()
|
||||
db_clear_breakpoints(void)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -220,8 +211,7 @@ db_clear_breakpoints()
|
||||
* so the breakpoint does not have to be on the breakpoint list.
|
||||
*/
|
||||
db_breakpoint_t
|
||||
db_set_temp_breakpoint(addr)
|
||||
db_addr_t addr;
|
||||
db_set_temp_breakpoint(db_addr_t addr)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -242,8 +232,7 @@ db_set_temp_breakpoint(addr)
|
||||
}
|
||||
|
||||
void
|
||||
db_delete_temp_breakpoint(bkpt)
|
||||
db_breakpoint_t bkpt;
|
||||
db_delete_temp_breakpoint(db_breakpoint_t bkpt)
|
||||
{
|
||||
BKPT_CLEAR(bkpt->address, &bkpt->bkpt_inst);
|
||||
db_breakpoint_free(bkpt);
|
||||
@ -254,7 +243,7 @@ db_delete_temp_breakpoint(bkpt)
|
||||
* List breakpoints.
|
||||
*/
|
||||
static void
|
||||
db_list_breakpoints()
|
||||
db_list_breakpoints(void)
|
||||
{
|
||||
register db_breakpoint_t bkpt;
|
||||
|
||||
@ -278,11 +267,7 @@ db_list_breakpoints()
|
||||
/* Delete breakpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_delete_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
db_delete_breakpoint(db_map_addr(addr), (db_addr_t)addr);
|
||||
}
|
||||
@ -290,11 +275,8 @@ db_delete_cmd(addr, have_addr, count, modif)
|
||||
/* Set breakpoint with skip count */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_breakpoint_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_breakpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
if (count == -1)
|
||||
count = 1;
|
||||
@ -304,11 +286,8 @@ db_breakpoint_cmd(addr, have_addr, count, modif)
|
||||
|
||||
/* list breakpoints */
|
||||
void
|
||||
db_listbreak_cmd(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
db_expr_t dummy3;
|
||||
char * dummy4;
|
||||
db_listbreak_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3,
|
||||
char *dummy4)
|
||||
{
|
||||
db_list_breakpoints();
|
||||
}
|
||||
@ -320,8 +299,7 @@ db_listbreak_cmd(dummy1, dummy2, dummy3, dummy4)
|
||||
*/
|
||||
|
||||
boolean_t
|
||||
db_map_equal(map1, map2)
|
||||
vm_map_t map1, map2;
|
||||
db_map_equal(vm_map_t map1, vm_map_t map2)
|
||||
{
|
||||
return ((map1 == map2) ||
|
||||
((map1 == NULL) && (map2 == kernel_map)) ||
|
||||
@ -329,8 +307,7 @@ db_map_equal(map1, map2)
|
||||
}
|
||||
|
||||
boolean_t
|
||||
db_map_current(map)
|
||||
vm_map_t map;
|
||||
db_map_current(vm_map_t map)
|
||||
{
|
||||
#if 0
|
||||
thread_t thread;
|
||||
@ -345,8 +322,7 @@ db_map_current(map)
|
||||
}
|
||||
|
||||
vm_map_t
|
||||
db_map_addr(addr)
|
||||
vm_offset_t addr;
|
||||
db_map_addr(vm_offset_t addr)
|
||||
{
|
||||
#if 0
|
||||
thread_t thread;
|
||||
|
@ -157,7 +157,7 @@ static boolean_t db_ed_style = TRUE;
|
||||
* Utility routine - discard tokens through end-of-line.
|
||||
*/
|
||||
void
|
||||
db_skip_to_eol()
|
||||
db_skip_to_eol(void)
|
||||
{
|
||||
int t;
|
||||
do {
|
||||
@ -252,11 +252,8 @@ db_command_unregister(struct command_table *list, struct command *cmd)
|
||||
* Helper function to match a single command.
|
||||
*/
|
||||
static void
|
||||
db_cmd_match(name, cmd, cmdp, resultp)
|
||||
char * name;
|
||||
struct command *cmd;
|
||||
struct command **cmdp; /* out */
|
||||
int * resultp;
|
||||
db_cmd_match(char *name, struct command *cmd, struct command **cmdp,
|
||||
int *resultp)
|
||||
{
|
||||
char *lp, *rp;
|
||||
int c;
|
||||
@ -291,10 +288,7 @@ db_cmd_match(name, cmd, cmdp, resultp)
|
||||
* Search for command prefix.
|
||||
*/
|
||||
static int
|
||||
db_cmd_search(name, table, cmdp)
|
||||
char * name;
|
||||
struct command_table *table;
|
||||
struct command **cmdp; /* out */
|
||||
db_cmd_search(char *name, struct command_table *table, struct command **cmdp)
|
||||
{
|
||||
struct command *cmd;
|
||||
int result = CMD_NONE;
|
||||
@ -315,8 +309,7 @@ db_cmd_search(name, table, cmdp)
|
||||
}
|
||||
|
||||
static void
|
||||
db_cmd_list(table)
|
||||
struct command_table *table;
|
||||
db_cmd_list(struct command_table *table)
|
||||
{
|
||||
register struct command *cmd;
|
||||
|
||||
@ -327,10 +320,8 @@ db_cmd_list(table)
|
||||
}
|
||||
|
||||
static void
|
||||
db_command(last_cmdp, cmd_table, dopager)
|
||||
struct command **last_cmdp; /* IN_OUT */
|
||||
struct command_table *cmd_table;
|
||||
int dopager;
|
||||
db_command(struct command **last_cmdp, struct command_table *cmd_table,
|
||||
int dopager)
|
||||
{
|
||||
struct command *cmd = NULL;
|
||||
int t;
|
||||
@ -483,7 +474,7 @@ DB_COMMAND(panic, db_panic)
|
||||
}
|
||||
|
||||
void
|
||||
db_command_loop()
|
||||
db_command_loop(void)
|
||||
{
|
||||
/*
|
||||
* Initialize 'prev' and 'next' to dot.
|
||||
@ -521,8 +512,7 @@ db_command_script(const char *command)
|
||||
}
|
||||
|
||||
void
|
||||
db_error(s)
|
||||
const char *s;
|
||||
db_error(const char *s)
|
||||
{
|
||||
if (s)
|
||||
db_printf("%s", s);
|
||||
@ -581,11 +571,7 @@ db_fncall_generic(db_expr_t addr, db_expr_t *rv, int nargs, db_expr_t args[])
|
||||
}
|
||||
|
||||
static void
|
||||
db_fncall(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
db_expr_t dummy3;
|
||||
char * dummy4;
|
||||
db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t fn_addr;
|
||||
db_expr_t args[DB_MAXARGS];
|
||||
@ -639,11 +625,7 @@ db_halt(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
}
|
||||
|
||||
static void
|
||||
db_kill(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
db_expr_t dummy3;
|
||||
char * dummy4;
|
||||
db_kill(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t old_radix, pid, sig;
|
||||
struct proc *p;
|
||||
@ -732,11 +714,7 @@ db_reset(db_expr_t addr, boolean_t have_addr, db_expr_t count __unused,
|
||||
}
|
||||
|
||||
static void
|
||||
db_watchdog(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
db_expr_t dummy3;
|
||||
char * dummy4;
|
||||
db_watchdog(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t old_radix, tout;
|
||||
int err, i;
|
||||
|
@ -52,11 +52,8 @@ static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int);
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_examine_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_examine_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
if (modif[0] != '\0')
|
||||
db_strcpy(db_examine_format, modif);
|
||||
@ -68,11 +65,7 @@ db_examine_cmd(addr, have_addr, count, modif)
|
||||
}
|
||||
|
||||
static void
|
||||
db_examine(addr, fmt, count)
|
||||
register
|
||||
db_addr_t addr;
|
||||
char * fmt; /* format string */
|
||||
int count; /* repeat count */
|
||||
db_examine(db_addr_t addr, char *fmt, int count)
|
||||
{
|
||||
int c;
|
||||
db_expr_t value;
|
||||
@ -197,11 +190,8 @@ static char db_print_format = 'x';
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_print_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_print_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
db_expr_t value;
|
||||
|
||||
@ -242,8 +232,7 @@ db_print_cmd(addr, have_addr, count, modif)
|
||||
}
|
||||
|
||||
void
|
||||
db_print_loc_and_inst(loc)
|
||||
db_addr_t loc;
|
||||
db_print_loc_and_inst(db_addr_t loc)
|
||||
{
|
||||
db_printsym(loc, DB_STGY_PROC);
|
||||
db_printf(":\t");
|
||||
@ -255,11 +244,8 @@ db_print_loc_and_inst(loc)
|
||||
* Syntax: search [/bhl] addr value [mask] [,count]
|
||||
*/
|
||||
void
|
||||
db_search_cmd(dummy1, dummy2, dummy3, dummy4)
|
||||
db_expr_t dummy1;
|
||||
boolean_t dummy2;
|
||||
db_expr_t dummy3;
|
||||
char * dummy4;
|
||||
db_search_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3,
|
||||
char *dummy4)
|
||||
{
|
||||
int t;
|
||||
db_addr_t addr;
|
||||
@ -323,13 +309,8 @@ db_search_cmd(dummy1, dummy2, dummy3, dummy4)
|
||||
}
|
||||
|
||||
static void
|
||||
db_search(addr, size, value, mask, count)
|
||||
register
|
||||
db_addr_t addr;
|
||||
int size;
|
||||
db_expr_t value;
|
||||
db_expr_t mask;
|
||||
unsigned int count;
|
||||
db_search(db_addr_t addr, int size, db_expr_t value, db_expr_t mask,
|
||||
unsigned int count)
|
||||
{
|
||||
while (count-- != 0) {
|
||||
db_prev = addr;
|
||||
|
@ -346,7 +346,7 @@ db_readline(lstart, lsize)
|
||||
}
|
||||
|
||||
void
|
||||
db_check_interrupt()
|
||||
db_check_interrupt(void)
|
||||
{
|
||||
register int c;
|
||||
|
||||
|
@ -49,7 +49,7 @@ static int db_read_char(void);
|
||||
static void db_unread_char(int);
|
||||
|
||||
int
|
||||
db_read_line()
|
||||
db_read_line(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -97,7 +97,7 @@ db_flush_line()
|
||||
static int db_look_char = 0;
|
||||
|
||||
static int
|
||||
db_read_char()
|
||||
db_read_char(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@ -148,7 +148,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;
|
||||
@ -156,7 +156,7 @@ db_flush_lex()
|
||||
}
|
||||
|
||||
static int
|
||||
db_lex()
|
||||
db_lex(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
@ -91,7 +91,7 @@ static void db_pager(void);
|
||||
* Force pending whitespace.
|
||||
*/
|
||||
void
|
||||
db_force_whitespace()
|
||||
db_force_whitespace(void)
|
||||
{
|
||||
register int last_print, next_tab;
|
||||
|
||||
@ -308,7 +308,7 @@ db_pager(void)
|
||||
* Return output position
|
||||
*/
|
||||
int
|
||||
db_print_position()
|
||||
db_print_position(void)
|
||||
{
|
||||
return (db_output_position);
|
||||
}
|
||||
|
@ -78,8 +78,7 @@ db_breakpoint_t db_taken_bkpt = 0;
|
||||
#endif
|
||||
|
||||
boolean_t
|
||||
db_stop_at_pc(is_breakpoint)
|
||||
boolean_t *is_breakpoint;
|
||||
db_stop_at_pc(boolean_t *is_breakpoint)
|
||||
{
|
||||
register db_addr_t pc;
|
||||
register db_breakpoint_t bkpt;
|
||||
@ -180,8 +179,7 @@ db_stop_at_pc(is_breakpoint)
|
||||
}
|
||||
|
||||
void
|
||||
db_restart_at_pc(watchpt)
|
||||
boolean_t watchpt;
|
||||
db_restart_at_pc(boolean_t watchpt)
|
||||
{
|
||||
register db_addr_t pc = PC_REGS();
|
||||
|
||||
@ -328,11 +326,8 @@ db_single_step_cmd(addr, have_addr, count, modif)
|
||||
/* trace and print until call/return */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_trace_until_call_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
boolean_t print = FALSE;
|
||||
|
||||
@ -350,11 +345,8 @@ db_trace_until_call_cmd(addr, have_addr, count, modif)
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_trace_until_matching_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr,
|
||||
db_expr_t count, char *modif)
|
||||
{
|
||||
boolean_t print = FALSE;
|
||||
|
||||
@ -374,11 +366,8 @@ db_trace_until_matching_cmd(addr, have_addr, count, modif)
|
||||
/* continue */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_continue_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_continue_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
if (modif[0] == 'c')
|
||||
db_run_mode = STEP_COUNT;
|
||||
|
@ -170,11 +170,7 @@ db_var_curvnet(struct db_variable *vp, db_expr_t *valuep, int op)
|
||||
* Add symbol table, with given name, to list of symbol tables.
|
||||
*/
|
||||
void
|
||||
db_add_symbol_table(start, end, name, ref)
|
||||
char *start;
|
||||
char *end;
|
||||
char *name;
|
||||
char *ref;
|
||||
db_add_symbol_table(char *start, char *end, char *name, char *ref)
|
||||
{
|
||||
if (db_nsymtab >= MAXNOSYMTABS) {
|
||||
printf ("No slots left for %s symbol table", name);
|
||||
@ -195,9 +191,7 @@ db_add_symbol_table(start, end, name, ref)
|
||||
* overwritten by each call... but in practice this seems okay.
|
||||
*/
|
||||
static char *
|
||||
db_qualify(sym, symtabname)
|
||||
c_db_sym_t sym;
|
||||
register char *symtabname;
|
||||
db_qualify(c_db_sym_t sym, char *symtabname)
|
||||
{
|
||||
const char *symname;
|
||||
static char tmp[256];
|
||||
@ -209,10 +203,7 @@ db_qualify(sym, symtabname)
|
||||
|
||||
|
||||
boolean_t
|
||||
db_eqname(src, dst, c)
|
||||
const char *src;
|
||||
const char *dst;
|
||||
int c;
|
||||
db_eqname(const char *src, const char *dst, int c)
|
||||
{
|
||||
if (!strcmp(src, dst))
|
||||
return (TRUE);
|
||||
@ -222,9 +213,7 @@ db_eqname(src, dst, c)
|
||||
}
|
||||
|
||||
boolean_t
|
||||
db_value_of_name(name, valuep)
|
||||
const char *name;
|
||||
db_expr_t *valuep;
|
||||
db_value_of_name(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
c_db_sym_t sym;
|
||||
|
||||
@ -236,9 +225,7 @@ db_value_of_name(name, valuep)
|
||||
}
|
||||
|
||||
boolean_t
|
||||
db_value_of_name_pcpu(name, valuep)
|
||||
const char *name;
|
||||
db_expr_t *valuep;
|
||||
db_value_of_name_pcpu(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
static char tmp[256];
|
||||
db_expr_t value;
|
||||
@ -261,9 +248,7 @@ db_value_of_name_pcpu(name, valuep)
|
||||
}
|
||||
|
||||
boolean_t
|
||||
db_value_of_name_vnet(name, valuep)
|
||||
const char *name;
|
||||
db_expr_t *valuep;
|
||||
db_value_of_name_vnet(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
#ifdef VIMAGE
|
||||
static char tmp[256];
|
||||
@ -296,8 +281,7 @@ db_value_of_name_vnet(name, valuep)
|
||||
* otherwise, all symbol tables will be searched.
|
||||
*/
|
||||
static c_db_sym_t
|
||||
db_lookup(symstr)
|
||||
const char *symstr;
|
||||
db_lookup(const char *symstr)
|
||||
{
|
||||
c_db_sym_t sp;
|
||||
register int i;
|
||||
@ -354,8 +338,7 @@ static volatile boolean_t db_qualify_ambiguous_names = FALSE;
|
||||
* Used by db_symbol_values to decide whether to qualify a symbol.
|
||||
*/
|
||||
static boolean_t
|
||||
db_symbol_is_ambiguous(sym)
|
||||
c_db_sym_t sym;
|
||||
db_symbol_is_ambiguous(c_db_sym_t sym)
|
||||
{
|
||||
const char *sym_name;
|
||||
register int i;
|
||||
@ -381,10 +364,7 @@ db_symbol_is_ambiguous(sym)
|
||||
* and the difference between val and the symbol found.
|
||||
*/
|
||||
c_db_sym_t
|
||||
db_search_symbol( val, strategy, offp)
|
||||
register db_addr_t val;
|
||||
db_strategy_t strategy;
|
||||
db_expr_t *offp;
|
||||
db_search_symbol(db_addr_t val, db_strategy_t strategy, db_expr_t *offp)
|
||||
{
|
||||
register
|
||||
unsigned int diff;
|
||||
@ -409,10 +389,7 @@ db_search_symbol( val, strategy, offp)
|
||||
* Return name and value of a symbol
|
||||
*/
|
||||
void
|
||||
db_symbol_values(sym, namep, valuep)
|
||||
c_db_sym_t sym;
|
||||
const char **namep;
|
||||
db_expr_t *valuep;
|
||||
db_symbol_values(c_db_sym_t sym, const char **namep, db_expr_t *valuep)
|
||||
{
|
||||
db_expr_t value;
|
||||
|
||||
@ -449,9 +426,7 @@ db_symbol_values(sym, namep, valuep)
|
||||
db_expr_t db_maxoff = 0x10000;
|
||||
|
||||
void
|
||||
db_printsym(off, strategy)
|
||||
db_expr_t off;
|
||||
db_strategy_t strategy;
|
||||
db_printsym(db_expr_t off, db_strategy_t strategy)
|
||||
{
|
||||
db_expr_t d;
|
||||
char *filename;
|
||||
@ -486,20 +461,13 @@ db_printsym(off, strategy)
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
db_line_at_pc( sym, filename, linenum, pc)
|
||||
c_db_sym_t sym;
|
||||
char **filename;
|
||||
int *linenum;
|
||||
db_expr_t pc;
|
||||
db_line_at_pc(c_db_sym_t sym, char **filename, int *linenum, db_expr_t pc)
|
||||
{
|
||||
return X_db_line_at_pc( db_last_symtab, sym, filename, linenum, pc);
|
||||
}
|
||||
|
||||
int
|
||||
db_sym_numargs(sym, nargp, argnames)
|
||||
c_db_sym_t sym;
|
||||
int *nargp;
|
||||
char **argnames;
|
||||
db_sym_numargs(c_db_sym_t sym, int *nargp, char **argnames)
|
||||
{
|
||||
return X_db_sym_numargs(db_last_symtab, sym, nargp, argnames);
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ static void db_set_watchpoint(vm_map_t map, db_addr_t addr,
|
||||
vm_size_t size);
|
||||
|
||||
static db_watchpoint_t
|
||||
db_watchpoint_alloc()
|
||||
db_watchpoint_alloc(void)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
|
||||
@ -86,18 +86,14 @@ db_watchpoint_alloc()
|
||||
}
|
||||
|
||||
static void
|
||||
db_watchpoint_free(watch)
|
||||
register db_watchpoint_t watch;
|
||||
db_watchpoint_free(db_watchpoint_t watch)
|
||||
{
|
||||
watch->link = db_free_watchpoints;
|
||||
db_free_watchpoints = watch;
|
||||
}
|
||||
|
||||
static void
|
||||
db_set_watchpoint(map, addr, size)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
vm_size_t size;
|
||||
db_set_watchpoint(vm_map_t map, db_addr_t addr, vm_size_t size)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
|
||||
@ -137,9 +133,7 @@ db_set_watchpoint(map, addr, size)
|
||||
}
|
||||
|
||||
static void
|
||||
db_delete_watchpoint(map, addr)
|
||||
vm_map_t map;
|
||||
db_addr_t addr;
|
||||
db_delete_watchpoint(vm_map_t map, db_addr_t addr)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
register db_watchpoint_t *prev;
|
||||
@ -159,7 +153,7 @@ db_delete_watchpoint(map, addr)
|
||||
}
|
||||
|
||||
static void
|
||||
db_list_watchpoints()
|
||||
db_list_watchpoints(void)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
|
||||
@ -189,11 +183,8 @@ db_list_watchpoints()
|
||||
/* Delete watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_deletewatch_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_deletewatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
db_delete_watchpoint(db_map_addr(addr), addr);
|
||||
}
|
||||
@ -201,11 +192,8 @@ db_deletewatch_cmd(addr, have_addr, count, modif)
|
||||
/* Set watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_watchpoint_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_watchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
vm_size_t size;
|
||||
db_expr_t value;
|
||||
@ -230,7 +218,7 @@ DB_SHOW_COMMAND(watches, db_listwatch_cmd)
|
||||
}
|
||||
|
||||
void
|
||||
db_set_watchpoints()
|
||||
db_set_watchpoints(void)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
|
||||
@ -248,17 +236,14 @@ db_set_watchpoints()
|
||||
}
|
||||
|
||||
void
|
||||
db_clear_watchpoints()
|
||||
db_clear_watchpoints(void)
|
||||
{
|
||||
db_watchpoints_inserted = FALSE;
|
||||
}
|
||||
|
||||
#ifdef notused
|
||||
static 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)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
db_watchpoint_t found = 0;
|
||||
@ -295,11 +280,8 @@ db_find_watchpoint(map, addr, regs)
|
||||
/* Delete hardware watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_deletehwatch_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_deletehwatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@ -314,11 +296,8 @@ db_deletehwatch_cmd(addr, have_addr, count, modif)
|
||||
/* Set hardware watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_hwatchpoint_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_hwatchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
@ -43,11 +43,8 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_write_cmd(address, have_addr, count, modif)
|
||||
db_expr_t address;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count,
|
||||
char * modif)
|
||||
{
|
||||
register
|
||||
db_addr_t addr;
|
||||
|
Loading…
Reference in New Issue
Block a user