ddb: finish converting boolean values.
The replacement started at r283088 was necessarily incomplete without replacing boolean_t with bool. This also involved cleaning some type mismatches and ansifying old C function declarations. Pointed out by: bde Discussed with: bde, ian, jhb
This commit is contained in:
parent
9c36af585e
commit
cd508278c1
@ -1223,9 +1223,7 @@ db_disasm_esc(loc, inst, rex, short_addr, size, seg)
|
||||
* next instruction.
|
||||
*/
|
||||
db_addr_t
|
||||
db_disasm(loc, altfmt)
|
||||
db_addr_t loc;
|
||||
boolean_t altfmt;
|
||||
db_disasm(db_addr_t loc, bool altfmt)
|
||||
{
|
||||
int inst;
|
||||
int size;
|
||||
|
@ -70,7 +70,7 @@ db_disasm_printaddr(u_int address)
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
db_disasm(vm_offset_t loc, boolean_t altfmt)
|
||||
db_disasm(vm_offset_t loc, bool altfmt)
|
||||
{
|
||||
|
||||
return disasm(&db_disasm_interface, loc, altfmt);
|
||||
|
@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ddb/ddb.h>
|
||||
|
||||
vm_offset_t
|
||||
db_disasm(vm_offset_t loc, boolean_t altfmt)
|
||||
db_disasm(vm_offset_t loc, bool altfmt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ static unsigned db_extend[] = { /* table for sign-extending */
|
||||
#endif
|
||||
|
||||
db_expr_t
|
||||
db_get_value(db_addr_t addr, int size, boolean_t is_signed)
|
||||
db_get_value(db_addr_t addr, int size, bool is_signed)
|
||||
{
|
||||
char data[sizeof(u_int64_t)];
|
||||
register db_expr_t value;
|
||||
|
@ -36,7 +36,7 @@
|
||||
/*
|
||||
* Data access functions for debugger.
|
||||
*/
|
||||
db_expr_t db_get_value(db_addr_t addr, int size, boolean_t is_signed);
|
||||
db_expr_t db_get_value(db_addr_t addr, int size, bool is_signed);
|
||||
void db_put_value(db_addr_t addr, int size, db_expr_t value);
|
||||
|
||||
#endif /* !_DDB_DB_ACCESS_H_ */
|
||||
|
@ -155,7 +155,7 @@ db_find_breakpoint_here(db_addr_t addr)
|
||||
return db_find_breakpoint(db_map_addr(addr), addr);
|
||||
}
|
||||
|
||||
static boolean_t db_breakpoints_inserted = true;
|
||||
static bool db_breakpoints_inserted = true;
|
||||
|
||||
#ifndef BKPT_WRITE
|
||||
#define BKPT_WRITE(addr, storage) \
|
||||
@ -267,7 +267,7 @@ db_list_breakpoints(void)
|
||||
/* Delete breakpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
db_delete_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
db_delete_breakpoint(db_map_addr(addr), (db_addr_t)addr);
|
||||
}
|
||||
@ -275,8 +275,7 @@ db_delete_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
/* Set breakpoint with skip count */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_breakpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_breakpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
if (count == -1)
|
||||
count = 1;
|
||||
@ -286,8 +285,7 @@ db_breakpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
|
||||
/* list breakpoints */
|
||||
void
|
||||
db_listbreak_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3,
|
||||
char *dummy4)
|
||||
db_listbreak_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_list_breakpoints();
|
||||
}
|
||||
@ -298,7 +296,7 @@ db_listbreak_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3,
|
||||
* (or both) may be null.
|
||||
*/
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_map_equal(vm_map_t map1, vm_map_t map2)
|
||||
{
|
||||
return ((map1 == map2) ||
|
||||
@ -306,7 +304,7 @@ db_map_equal(vm_map_t map1, vm_map_t map2)
|
||||
((map1 == kernel_map) && (map2 == NULL)));
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_map_current(vm_map_t map)
|
||||
{
|
||||
#if 0
|
||||
@ -317,7 +315,7 @@ db_map_current(vm_map_t map)
|
||||
(((thread = current_thread()) != NULL) &&
|
||||
(map == thread->task->map)));
|
||||
#else
|
||||
return (1);
|
||||
return (true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -331,8 +331,7 @@ db_capture_usage(void)
|
||||
}
|
||||
|
||||
void
|
||||
db_capture_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_capture_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
int t;
|
||||
|
||||
|
@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
|
||||
/*
|
||||
* Exported global variables
|
||||
*/
|
||||
boolean_t db_cmd_loop_done;
|
||||
bool db_cmd_loop_done;
|
||||
db_addr_t db_dot;
|
||||
db_addr_t db_last_addr;
|
||||
db_addr_t db_prev;
|
||||
@ -151,7 +151,7 @@ static struct command *db_last_command = 0;
|
||||
* and '+' points to next line.
|
||||
* Otherwise: 'dot' points to next item, '..' points to last.
|
||||
*/
|
||||
static boolean_t db_ed_style = true;
|
||||
static bool db_ed_style = true;
|
||||
|
||||
/*
|
||||
* Utility routine - discard tokens through end-of-line.
|
||||
@ -327,7 +327,7 @@ db_command(struct command **last_cmdp, struct command_table *cmd_table,
|
||||
int t;
|
||||
char modif[TOK_STRING_SIZE];
|
||||
db_expr_t addr, count;
|
||||
boolean_t have_addr = false;
|
||||
bool have_addr = false;
|
||||
int result;
|
||||
|
||||
t = db_read_token();
|
||||
@ -340,7 +340,7 @@ db_command(struct command **last_cmdp, struct command_table *cmd_table,
|
||||
modif[0] = '\0';
|
||||
}
|
||||
else if (t == tEXCL) {
|
||||
db_fncall((db_expr_t)0, (boolean_t)0, (db_expr_t)0, (char *)0);
|
||||
db_fncall((db_expr_t)0, (bool)false, (db_expr_t)0, (char *)0);
|
||||
return;
|
||||
}
|
||||
else if (t != tIDENT) {
|
||||
@ -521,7 +521,7 @@ db_error(const char *s)
|
||||
}
|
||||
|
||||
static void
|
||||
db_dump(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_dump(db_expr_t dummy, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
int error;
|
||||
|
||||
@ -571,7 +571,7 @@ db_fncall_generic(db_expr_t addr, db_expr_t *rv, int nargs, db_expr_t args[])
|
||||
}
|
||||
|
||||
static void
|
||||
db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_fncall(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t fn_addr;
|
||||
db_expr_t args[DB_MAXARGS];
|
||||
@ -618,14 +618,14 @@ db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
}
|
||||
|
||||
static void
|
||||
db_halt(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_halt(db_expr_t dummy, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
|
||||
cpu_halt();
|
||||
}
|
||||
|
||||
static void
|
||||
db_kill(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_kill(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t old_radix, pid, sig;
|
||||
struct proc *p;
|
||||
@ -684,7 +684,7 @@ out:
|
||||
#endif
|
||||
|
||||
static void
|
||||
db_reset(db_expr_t addr, boolean_t have_addr, db_expr_t count __unused,
|
||||
db_reset(db_expr_t addr, bool have_addr, db_expr_t count __unused,
|
||||
char *modif __unused)
|
||||
{
|
||||
int delay, loop;
|
||||
@ -714,7 +714,7 @@ db_reset(db_expr_t addr, boolean_t have_addr, db_expr_t count __unused,
|
||||
}
|
||||
|
||||
static void
|
||||
db_watchdog(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_watchdog(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
db_expr_t old_radix, tout;
|
||||
int err, i;
|
||||
@ -737,7 +737,7 @@ db_watchdog(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
}
|
||||
|
||||
static void
|
||||
db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_gdb(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
|
||||
if (kdb_dbbe_select("gdb") != 0) {
|
||||
@ -753,7 +753,7 @@ db_gdb(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
}
|
||||
|
||||
static void
|
||||
db_stack_trace(db_expr_t tid, boolean_t hastid, db_expr_t count, char *modif)
|
||||
db_stack_trace(db_expr_t tid, bool hastid, db_expr_t count, char *modif)
|
||||
{
|
||||
struct thread *td;
|
||||
db_expr_t radix;
|
||||
@ -799,7 +799,7 @@ db_stack_trace(db_expr_t tid, boolean_t hastid, db_expr_t count, char *modif)
|
||||
}
|
||||
|
||||
static void
|
||||
db_stack_trace_all(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3,
|
||||
db_stack_trace_all(db_expr_t dummy, bool dummy2, db_expr_t dummy3,
|
||||
char *dummy4)
|
||||
{
|
||||
struct proc *p;
|
||||
|
@ -52,8 +52,7 @@ static void db_search(db_addr_t, int, db_expr_t, db_expr_t, u_int);
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_examine_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_examine_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
if (modif[0] != '\0')
|
||||
db_strcpy(db_examine_format, modif);
|
||||
@ -190,8 +189,7 @@ static char db_print_format = 'x';
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_print_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_print_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
db_expr_t value;
|
||||
|
||||
@ -244,8 +242,7 @@ db_print_loc_and_inst(db_addr_t loc)
|
||||
* Syntax: search [/bhl] addr value [mask] [,count]
|
||||
*/
|
||||
void
|
||||
db_search_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3,
|
||||
char *dummy4)
|
||||
db_search_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
int t;
|
||||
db_addr_t addr;
|
||||
|
@ -38,13 +38,13 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_command.h>
|
||||
|
||||
static boolean_t db_add_expr(db_expr_t *valuep);
|
||||
static boolean_t db_mult_expr(db_expr_t *valuep);
|
||||
static boolean_t db_shift_expr(db_expr_t *valuep);
|
||||
static boolean_t db_term(db_expr_t *valuep);
|
||||
static boolean_t db_unary(db_expr_t *valuep);
|
||||
static bool db_add_expr(db_expr_t *valuep);
|
||||
static bool db_mult_expr(db_expr_t *valuep);
|
||||
static bool db_shift_expr(db_expr_t *valuep);
|
||||
static bool db_term(db_expr_t *valuep);
|
||||
static bool db_unary(db_expr_t *valuep);
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
db_term(db_expr_t *valuep)
|
||||
{
|
||||
int t;
|
||||
@ -100,7 +100,7 @@ db_term(db_expr_t *valuep)
|
||||
return (false);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
db_unary(db_expr_t *valuep)
|
||||
{
|
||||
int t;
|
||||
@ -127,7 +127,7 @@ db_unary(db_expr_t *valuep)
|
||||
return (db_term(valuep));
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
db_mult_expr(db_expr_t *valuep)
|
||||
{
|
||||
db_expr_t lhs, rhs;
|
||||
@ -163,7 +163,7 @@ db_mult_expr(db_expr_t *valuep)
|
||||
return (true);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
db_add_expr(db_expr_t *valuep)
|
||||
{
|
||||
db_expr_t lhs, rhs;
|
||||
@ -189,7 +189,7 @@ db_add_expr(db_expr_t *valuep)
|
||||
return (true);
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
db_shift_expr(db_expr_t *valuep)
|
||||
{
|
||||
db_expr_t lhs, rhs;
|
||||
|
@ -63,7 +63,7 @@ KDB_BACKEND(ddb, db_init, db_trace_self_wrapper, db_trace_thread_wrapper,
|
||||
*/
|
||||
vm_offset_t ksymtab, kstrtab, ksymtab_size;
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t sym, char **file, int *line,
|
||||
db_expr_t off)
|
||||
{
|
||||
@ -145,7 +145,7 @@ X_db_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strat,
|
||||
return ((c_db_sym_t)match);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
X_db_sym_numargs(db_symtab_t *symtab, c_db_sym_t sym, int *nargp,
|
||||
char **argp)
|
||||
{
|
||||
@ -216,7 +216,7 @@ db_trap(int type, int code)
|
||||
{
|
||||
jmp_buf jb;
|
||||
void *prev_jb;
|
||||
boolean_t bkpt, watchpt;
|
||||
bool bkpt, watchpt;
|
||||
const char *why;
|
||||
|
||||
/*
|
||||
|
@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ddb/db_sym.h>
|
||||
|
||||
void
|
||||
db_show_regs(db_expr_t _1, boolean_t _2, db_expr_t _3, char *_4)
|
||||
db_show_regs(db_expr_t _1, bool _2, db_expr_t _3, char *_4)
|
||||
{
|
||||
struct db_variable *regp;
|
||||
db_expr_t value, offset;
|
||||
|
@ -75,7 +75,7 @@ DB_SHOW_ALL_COMMAND(procs, db_procs_cmd)
|
||||
* characters.
|
||||
*/
|
||||
void
|
||||
db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif)
|
||||
db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif)
|
||||
{
|
||||
volatile struct proc *p, *pp;
|
||||
volatile struct thread *td;
|
||||
@ -299,7 +299,7 @@ DB_SHOW_COMMAND(thread, db_show_thread)
|
||||
{
|
||||
struct thread *td;
|
||||
struct lock_object *lock;
|
||||
boolean_t comma;
|
||||
bool comma;
|
||||
|
||||
/* Determine which thread to examine. */
|
||||
if (have_addr)
|
||||
@ -432,8 +432,8 @@ DB_SHOW_COMMAND(proc, db_show_proc)
|
||||
}
|
||||
|
||||
void
|
||||
db_findstack_cmd(db_expr_t addr, boolean_t have_addr,
|
||||
db_expr_t dummy3 __unused, char *dummy4 __unused)
|
||||
db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused,
|
||||
char *dummy4 __unused)
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
|
@ -57,7 +57,7 @@ static int db_run_mode;
|
||||
#define STEP_INVISIBLE 5
|
||||
#define STEP_COUNT 6
|
||||
|
||||
static boolean_t db_sstep_print;
|
||||
static bool db_sstep_print;
|
||||
static int db_loop_count;
|
||||
static int db_call_depth;
|
||||
|
||||
@ -77,8 +77,8 @@ db_breakpoint_t db_not_taken_bkpt = 0;
|
||||
db_breakpoint_t db_taken_bkpt = 0;
|
||||
#endif
|
||||
|
||||
boolean_t
|
||||
db_stop_at_pc(boolean_t *is_breakpoint)
|
||||
bool
|
||||
db_stop_at_pc(bool *is_breakpoint)
|
||||
{
|
||||
register db_addr_t pc;
|
||||
register db_breakpoint_t bkpt;
|
||||
@ -179,7 +179,7 @@ db_stop_at_pc(boolean_t *is_breakpoint)
|
||||
}
|
||||
|
||||
void
|
||||
db_restart_at_pc(boolean_t watchpt)
|
||||
db_restart_at_pc(bool watchpt)
|
||||
{
|
||||
register db_addr_t pc = PC_REGS();
|
||||
|
||||
@ -234,7 +234,7 @@ db_restart_at_pc(boolean_t watchpt)
|
||||
* Just define the above conditional and provide
|
||||
* the functions/macros defined below.
|
||||
*
|
||||
* extern boolean_t
|
||||
* extern bool
|
||||
* inst_branch(), returns true if the instruction might branch
|
||||
* extern unsigned
|
||||
* branch_taken(), return the address the instruction might
|
||||
@ -299,13 +299,9 @@ extern int db_cmd_loop_done;
|
||||
/* single-step */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_single_step_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
boolean_t have_addr;
|
||||
db_expr_t count;
|
||||
char * modif;
|
||||
db_single_step_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
boolean_t print = false;
|
||||
bool print = false;
|
||||
|
||||
if (count == -1)
|
||||
count = 1;
|
||||
@ -326,10 +322,10 @@ db_single_step_cmd(addr, have_addr, count, modif)
|
||||
/* trace and print until call/return */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_trace_until_call_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
boolean_t print = false;
|
||||
bool print = false;
|
||||
|
||||
if (modif[0] == 'p')
|
||||
print = true;
|
||||
@ -345,10 +341,10 @@ db_trace_until_call_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr,
|
||||
db_expr_t count, char *modif)
|
||||
db_trace_until_matching_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
boolean_t print = false;
|
||||
bool print = false;
|
||||
|
||||
if (modif[0] == 'p')
|
||||
print = true;
|
||||
@ -366,8 +362,7 @@ db_trace_until_matching_cmd(db_expr_t addr, boolean_t have_addr,
|
||||
/* continue */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_continue_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_continue_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
if (modif[0] == 'c')
|
||||
db_run_mode = STEP_COUNT;
|
||||
|
@ -339,7 +339,7 @@ db_script_kdbenter(const char *eventname)
|
||||
* List scripts and their contents.
|
||||
*/
|
||||
void
|
||||
db_scripts_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_scripts_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int i;
|
||||
@ -357,7 +357,7 @@ db_scripts_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
* Execute a script.
|
||||
*/
|
||||
void
|
||||
db_run_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
db_run_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
int t;
|
||||
|
||||
@ -381,7 +381,7 @@ db_run_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
* we do not wish to use db_lex's token processing.
|
||||
*/
|
||||
void
|
||||
db_script_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_script_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
char *buf, scriptname[DB_MAXSCRIPTNAME];
|
||||
@ -427,7 +427,7 @@ db_script_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
* Remove a named script.
|
||||
*/
|
||||
void
|
||||
db_unscript_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_unscript_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int error, t;
|
||||
|
@ -58,8 +58,8 @@ static db_symtab_t *db_last_symtab; /* where last symbol was found */
|
||||
|
||||
static c_db_sym_t db_lookup( const char *symstr);
|
||||
static char *db_qualify(c_db_sym_t sym, char *symtabname);
|
||||
static boolean_t db_symbol_is_ambiguous(c_db_sym_t sym);
|
||||
static boolean_t db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t);
|
||||
static bool db_symbol_is_ambiguous(c_db_sym_t sym);
|
||||
static bool db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t);
|
||||
|
||||
static int db_cpu = -1;
|
||||
|
||||
@ -202,7 +202,7 @@ db_qualify(c_db_sym_t sym, char *symtabname)
|
||||
}
|
||||
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_eqname(const char *src, const char *dst, int c)
|
||||
{
|
||||
if (!strcmp(src, dst))
|
||||
@ -212,7 +212,7 @@ db_eqname(const char *src, const char *dst, int c)
|
||||
return (false);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_value_of_name(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
c_db_sym_t sym;
|
||||
@ -224,7 +224,7 @@ db_value_of_name(const char *name, db_expr_t *valuep)
|
||||
return (true);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_value_of_name_pcpu(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
static char tmp[256];
|
||||
@ -247,7 +247,7 @@ db_value_of_name_pcpu(const char *name, db_expr_t *valuep)
|
||||
return (true);
|
||||
}
|
||||
|
||||
boolean_t
|
||||
bool
|
||||
db_value_of_name_vnet(const char *name, db_expr_t *valuep)
|
||||
{
|
||||
#ifdef VIMAGE
|
||||
@ -331,19 +331,18 @@ db_lookup(const char *symstr)
|
||||
* If true, check across symbol tables for multiple occurrences
|
||||
* of a name. Might slow things down quite a bit.
|
||||
*/
|
||||
static volatile boolean_t db_qualify_ambiguous_names = false;
|
||||
static volatile bool db_qualify_ambiguous_names = false;
|
||||
|
||||
/*
|
||||
* Does this symbol name appear in more than one symbol table?
|
||||
* Used by db_symbol_values to decide whether to qualify a symbol.
|
||||
*/
|
||||
static boolean_t
|
||||
static bool
|
||||
db_symbol_is_ambiguous(c_db_sym_t sym)
|
||||
{
|
||||
const char *sym_name;
|
||||
register int i;
|
||||
register
|
||||
boolean_t found_once = false;
|
||||
register bool found_once = false;
|
||||
|
||||
if (!db_qualify_ambiguous_names)
|
||||
return (false);
|
||||
@ -352,7 +351,7 @@ db_symbol_is_ambiguous(c_db_sym_t sym)
|
||||
for (i = 0; i < db_nsymtab; i++) {
|
||||
if (X_db_lookup(&db_symtabs[i], sym_name)) {
|
||||
if (found_once)
|
||||
return true;
|
||||
return (true);
|
||||
found_once = true;
|
||||
}
|
||||
}
|
||||
@ -460,14 +459,14 @@ db_printsym(db_expr_t off, db_strategy_t strategy)
|
||||
}
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
static bool
|
||||
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);
|
||||
return (X_db_line_at_pc(db_last_symtab, sym, filename, linenum, pc));
|
||||
}
|
||||
|
||||
int
|
||||
bool
|
||||
db_sym_numargs(c_db_sym_t sym, int *nargp, char **argnames)
|
||||
{
|
||||
return X_db_sym_numargs(db_last_symtab, sym, nargp, argnames);
|
||||
return (X_db_sym_numargs(db_last_symtab, sym, nargp, argnames));
|
||||
}
|
||||
|
@ -86,20 +86,20 @@ void db_symbol_values(c_db_sym_t, const char **, db_expr_t *);
|
||||
db_symbol_values(db_search_symbol(val,DB_STGY_XTRN,offp),namep,0)
|
||||
/* ditto, but no locals */
|
||||
|
||||
int db_eqname(const char *, const char *, int);
|
||||
bool db_eqname(const char *, const char *, int);
|
||||
/* strcmp, modulo leading char */
|
||||
|
||||
void db_printsym(db_expr_t, db_strategy_t);
|
||||
/* print closest symbol to a value */
|
||||
|
||||
int db_sym_numargs(c_db_sym_t, int *, char **);
|
||||
bool db_sym_numargs(c_db_sym_t, int *, char **);
|
||||
|
||||
boolean_t X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t cursym,
|
||||
bool X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t cursym,
|
||||
char **filename, int *linenum, db_expr_t off);
|
||||
c_db_sym_t X_db_lookup(db_symtab_t *stab, const char *symstr);
|
||||
c_db_sym_t X_db_search_symbol(db_symtab_t *symtab, db_addr_t off,
|
||||
db_strategy_t strategy, db_expr_t *diffp);
|
||||
int X_db_sym_numargs(db_symtab_t *, c_db_sym_t, int *, char **);
|
||||
bool X_db_sym_numargs(db_symtab_t *, c_db_sym_t, int *, char **);
|
||||
void X_db_symbol_values(db_symtab_t *symtab, c_db_sym_t sym,
|
||||
const char **namep, db_expr_t *valuep);
|
||||
|
||||
|
@ -516,8 +516,7 @@ db_textdump_usage(void)
|
||||
}
|
||||
|
||||
void
|
||||
db_textdump_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
db_textdump_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
{
|
||||
int t;
|
||||
|
||||
|
@ -50,7 +50,7 @@ db_print_thread(void)
|
||||
}
|
||||
|
||||
void
|
||||
db_set_thread(db_expr_t tid, boolean_t hastid, db_expr_t cnt, char *mod)
|
||||
db_set_thread(db_expr_t tid, bool hastid, db_expr_t cnt, char *mod)
|
||||
{
|
||||
struct thread *thr;
|
||||
db_expr_t radix;
|
||||
@ -86,7 +86,7 @@ db_set_thread(db_expr_t tid, boolean_t hastid, db_expr_t cnt, char *mod)
|
||||
}
|
||||
|
||||
void
|
||||
db_show_threads(db_expr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
|
||||
db_show_threads(db_expr_t addr, bool hasaddr, db_expr_t cnt, char *mod)
|
||||
{
|
||||
jmp_buf jb;
|
||||
void *prev_jb;
|
||||
@ -115,7 +115,7 @@ db_show_threads(db_expr_t addr, boolean_t hasaddr, db_expr_t cnt, char *mod)
|
||||
* process. Otherwise, we treat the addr as a pointer to a thread.
|
||||
*/
|
||||
struct thread *
|
||||
db_lookup_thread(db_expr_t addr, boolean_t check_pid)
|
||||
db_lookup_thread(db_expr_t addr, bool check_pid)
|
||||
{
|
||||
struct thread *td;
|
||||
db_expr_t decaddr;
|
||||
|
@ -128,7 +128,7 @@ db_write_variable(struct db_variable *vp, db_expr_t value)
|
||||
}
|
||||
|
||||
void
|
||||
db_set_cmd(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
|
||||
db_set_cmd(db_expr_t dummy1, bool dummy2, db_expr_t dummy3, char *dummy4)
|
||||
{
|
||||
struct db_variable *vp;
|
||||
db_expr_t value;
|
||||
|
@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Watchpoints.
|
||||
*/
|
||||
|
||||
static boolean_t db_watchpoints_inserted = true;
|
||||
static bool db_watchpoints_inserted = true;
|
||||
|
||||
#define NWATCHPOINTS 100
|
||||
static struct db_watchpoint db_watch_table[NWATCHPOINTS];
|
||||
@ -59,7 +59,7 @@ static db_watchpoint_t db_watchpoint_alloc(void);
|
||||
static void db_watchpoint_free(db_watchpoint_t watch);
|
||||
static void db_delete_watchpoint(vm_map_t map, db_addr_t addr);
|
||||
#ifdef notused
|
||||
static boolean_t db_find_watchpoint(vm_map_t map, db_addr_t addr,
|
||||
static bool db_find_watchpoint(vm_map_t map, db_addr_t addr,
|
||||
db_regs_t *regs);
|
||||
#endif
|
||||
static void db_list_watchpoints(void);
|
||||
@ -183,7 +183,7 @@ db_list_watchpoints(void)
|
||||
/* Delete watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_deletewatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_deletewatch_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
db_delete_watchpoint(db_map_addr(addr), addr);
|
||||
@ -192,7 +192,7 @@ db_deletewatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
/* Set watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_watchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_watchpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
vm_size_t size;
|
||||
@ -242,7 +242,7 @@ db_clear_watchpoints(void)
|
||||
}
|
||||
|
||||
#ifdef notused
|
||||
static boolean_t
|
||||
static bool
|
||||
db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs)
|
||||
{
|
||||
register db_watchpoint_t watch;
|
||||
@ -280,7 +280,7 @@ db_find_watchpoint(vm_map_t map, db_addr_t addr, db_regs_t regs)
|
||||
/* Delete hardware watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_deletehwatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_deletehwatch_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int rc;
|
||||
@ -296,7 +296,7 @@ db_deletehwatch_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
/* Set hardware watchpoint */
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_hwatchpoint_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
db_hwatchpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif)
|
||||
{
|
||||
int rc;
|
||||
|
@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count,
|
||||
db_write_cmd(db_expr_t address, bool have_addr, db_expr_t count,
|
||||
char * modif)
|
||||
{
|
||||
register
|
||||
@ -52,7 +52,7 @@ db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count,
|
||||
db_expr_t old_value;
|
||||
db_expr_t new_value;
|
||||
register int size;
|
||||
boolean_t wrote_one = false;
|
||||
bool wrote_one = false;
|
||||
|
||||
addr = (db_addr_t) address;
|
||||
|
||||
|
@ -101,7 +101,7 @@ extern struct command_table db_show_all_table;
|
||||
/*
|
||||
* Type signature for a function implementing a ddb command.
|
||||
*/
|
||||
typedef void db_cmdfcn_t(db_expr_t addr, boolean_t have_addr, db_expr_t count,
|
||||
typedef void db_cmdfcn_t(db_expr_t addr, bool have_addr, db_expr_t count,
|
||||
char *modif);
|
||||
|
||||
/*
|
||||
@ -156,7 +156,7 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SUB_KLD, SI_ORDER_ANY, \
|
||||
static db_cmdfcn_t _func; \
|
||||
_DB_SET(_suffix, _name, _func, list, _flag, _more); \
|
||||
static void \
|
||||
_func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif)
|
||||
_func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
|
||||
/* common idom provided for backwards compatibility */
|
||||
#define DB_FUNC(_name, _func, list, _flag, _more) \
|
||||
@ -191,17 +191,17 @@ struct vm_map;
|
||||
|
||||
void db_check_interrupt(void);
|
||||
void db_clear_watchpoints(void);
|
||||
db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt);
|
||||
db_addr_t db_disasm(db_addr_t loc, bool altfmt);
|
||||
/* instruction disassembler */
|
||||
void db_error(const char *s);
|
||||
int db_expression(db_expr_t *valuep);
|
||||
int db_get_variable(db_expr_t *valuep);
|
||||
void db_iprintf(const char *,...) __printflike(1, 2);
|
||||
struct proc *db_lookup_proc(db_expr_t addr);
|
||||
struct thread *db_lookup_thread(db_expr_t addr, boolean_t check_pid);
|
||||
struct thread *db_lookup_thread(db_expr_t addr, bool check_pid);
|
||||
struct vm_map *db_map_addr(vm_offset_t);
|
||||
boolean_t db_map_current(struct vm_map *);
|
||||
boolean_t db_map_equal(struct vm_map *, struct vm_map *);
|
||||
bool db_map_current(struct vm_map *);
|
||||
bool db_map_equal(struct vm_map *, struct vm_map *);
|
||||
int db_md_set_watchpoint(db_expr_t addr, db_expr_t size);
|
||||
int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size);
|
||||
void db_md_list_watchpoints(void);
|
||||
@ -211,17 +211,17 @@ int db_printf(const char *fmt, ...) __printflike(1, 2);
|
||||
int db_read_bytes(vm_offset_t addr, size_t size, char *data);
|
||||
/* machine-dependent */
|
||||
int db_readline(char *lstart, int lsize);
|
||||
void db_restart_at_pc(boolean_t watchpt);
|
||||
void db_restart_at_pc(bool watchpt);
|
||||
int db_set_variable(db_expr_t value);
|
||||
void db_set_watchpoints(void);
|
||||
void db_skip_to_eol(void);
|
||||
boolean_t db_stop_at_pc(boolean_t *is_breakpoint);
|
||||
bool db_stop_at_pc(bool *is_breakpoint);
|
||||
#define db_strcpy strcpy
|
||||
void db_trace_self(void);
|
||||
int db_trace_thread(struct thread *, int);
|
||||
int db_value_of_name(const char *name, db_expr_t *valuep);
|
||||
int db_value_of_name_pcpu(const char *name, db_expr_t *valuep);
|
||||
int db_value_of_name_vnet(const char *name, db_expr_t *valuep);
|
||||
bool db_value_of_name(const char *name, db_expr_t *valuep);
|
||||
bool db_value_of_name_pcpu(const char *name, db_expr_t *valuep);
|
||||
bool db_value_of_name_vnet(const char *name, db_expr_t *valuep);
|
||||
int db_write_bytes(vm_offset_t addr, size_t size, char *data);
|
||||
void db_command_register(struct command_table *, struct command *);
|
||||
void db_command_unregister(struct command_table *, struct command *);
|
||||
|
@ -1148,9 +1148,7 @@ db_disasm_esc(loc, inst, short_addr, size, seg)
|
||||
* next instruction.
|
||||
*/
|
||||
db_addr_t
|
||||
db_disasm(loc, altfmt)
|
||||
db_addr_t loc;
|
||||
boolean_t altfmt;
|
||||
db_disasm(db_addr_t loc, bool altfmt)
|
||||
{
|
||||
int inst;
|
||||
int size;
|
||||
|
@ -1151,7 +1151,7 @@ DB_SHOW_COMMAND(lockchain, db_show_lockchain)
|
||||
|
||||
/* Figure out which thread to start with. */
|
||||
if (have_addr)
|
||||
td = db_lookup_thread(addr, TRUE);
|
||||
td = db_lookup_thread(addr, true);
|
||||
else
|
||||
td = kdb_thread;
|
||||
|
||||
@ -1236,7 +1236,7 @@ DB_SHOW_COMMAND(sleepchain, db_show_sleepchain)
|
||||
|
||||
/* Figure out which thread to start with. */
|
||||
if (have_addr)
|
||||
td = db_lookup_thread(addr, TRUE);
|
||||
td = db_lookup_thread(addr, true);
|
||||
else
|
||||
td = kdb_thread;
|
||||
|
||||
|
@ -2440,7 +2440,7 @@ DB_SHOW_COMMAND(locks, db_witness_list)
|
||||
struct thread *td;
|
||||
|
||||
if (have_addr)
|
||||
td = db_lookup_thread(addr, TRUE);
|
||||
td = db_lookup_thread(addr, true);
|
||||
else
|
||||
td = kdb_thread;
|
||||
witness_ddb_list(td);
|
||||
|
@ -130,7 +130,7 @@ static char *c0_reg[32] = {
|
||||
static int md_printins(int ins, int mdbdot);
|
||||
|
||||
db_addr_t
|
||||
db_disasm(db_addr_t loc, boolean_t altfmt)
|
||||
db_disasm(db_addr_t loc, bool altfmt)
|
||||
|
||||
{
|
||||
int ins;
|
||||
|
@ -3243,7 +3243,7 @@ DB_SHOW_COMMAND(ptable, ddb_pid_dump)
|
||||
vm_offset_t va;
|
||||
|
||||
if (have_addr) {
|
||||
td = db_lookup_thread(addr, TRUE);
|
||||
td = db_lookup_thread(addr, true);
|
||||
if (td == NULL) {
|
||||
db_printf("Invalid pid or tid");
|
||||
return;
|
||||
|
@ -571,7 +571,7 @@ DB_SHOW_COMMAND(pcb, ddb_dump_pcb)
|
||||
|
||||
/* Determine which thread to examine. */
|
||||
if (have_addr)
|
||||
td = db_lookup_thread(addr, TRUE);
|
||||
td = db_lookup_thread(addr, true);
|
||||
else
|
||||
td = curthread;
|
||||
|
||||
|
@ -936,7 +936,7 @@ dis_ppc(const struct opcode *opcodeset, instr_t instr, vm_offset_t loc)
|
||||
}
|
||||
|
||||
db_addr_t
|
||||
db_disasm(db_addr_t loc, boolean_t extended)
|
||||
db_disasm(db_addr_t loc, bool extended)
|
||||
{
|
||||
int class;
|
||||
instr_t opcode;
|
||||
|
@ -803,7 +803,7 @@ static const struct sparc_insn sparc_i[] = {
|
||||
};
|
||||
|
||||
db_addr_t
|
||||
db_disasm(db_addr_t loc, boolean_t altfmt)
|
||||
db_disasm(db_addr_t loc, bool altfmt)
|
||||
{
|
||||
const struct sparc_insn* i_ptr = (struct sparc_insn *)&sparc_i;
|
||||
unsigned int insn, you_lose, bitmask;
|
||||
|
Loading…
x
Reference in New Issue
Block a user