Take the safe approach of converting `boolean_t' to `int', `TRUE' to `1'
and `FALSE' to `0'.
This is to reduce the typedef mess that requires pulling MD/MI headers.
Per-arch ddb code will follow, ok?
Index: ddb/db_command.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_command.c,v
retrieving revision 1.86
diff -u -p -r1.86 db_command.c
--- ddb/db_command.c 1 Apr 2019 09:28:24 -0000 1.86
+++ ddb/db_command.c 5 Nov 2019 12:15:59 -0000
@@ -69,7 +69,7 @@ label_t *db_recover;
* and '+' points to next line.
* Otherwise: 'dot' points to next item, '..' points to last.
*/
-boolean_t db_ed_style = TRUE;
+int db_ed_style = 1;
db_addr_t db_dot; /* current location */
db_addr_t db_last_addr; /* last explicit address typed */
@@ -112,8 +112,8 @@ void db_show_panic_cmd(db_expr_t, int, d
void db_bcstats_print_cmd(db_expr_t, int, db_expr_t, char *);
void db_struct_offset_cmd(db_expr_t, int, db_expr_t, char *);
void db_ctf_show_struct(db_expr_t, int, db_expr_t, char *);
-void db_show_regs(db_expr_t, boolean_t, db_expr_t, char *);
-void db_write_cmd(db_expr_t, boolean_t, db_expr_t, char *);
+void db_show_regs(db_expr_t, int, db_expr_t, char *);
+void db_write_cmd(db_expr_t, int, db_expr_t, char *);
void db_witness_display(db_expr_t, int, db_expr_t, char *);
void db_witness_list(db_expr_t, int, db_expr_t, char *);
void db_witness_list_all(db_expr_t, int, db_expr_t, char *);
@@ -199,15 +199,14 @@ db_command(struct db_command **last_cmdp
int t;
char modif[TOK_STRING_SIZE];
db_expr_t addr, count;
- boolean_t have_addr = FALSE;
- int result;
+ int result, have_addr = 0;
t = db_read_token();
if (t == tEOL) {
/* empty line repeats last command, at 'next' */
cmd = *last_cmdp;
addr = (db_expr_t)db_next;
- have_addr = FALSE;
+ have_addr = 0;
count = 1;
modif[0] = '\0';
}
@@ -273,11 +272,11 @@ db_command(struct db_command **last_cmdp
if (db_expression(&addr)) {
db_dot = (db_addr_t) addr;
db_last_addr = db_dot;
- have_addr = TRUE;
+ have_addr = 1;
}
else {
addr = (db_expr_t) db_dot;
- have_addr = FALSE;
+ have_addr = 0;
}
t = db_read_token();
if (t == tCOMMA) {
@@ -329,10 +328,10 @@ db_command(struct db_command **last_cmdp
void
db_buf_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
vfs_buf_print((void *) addr, full, db_printf);
}
@@ -341,10 +340,10 @@ db_buf_print_cmd(db_expr_t addr, int hav
void
db_map_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
uvm_map_printit((struct vm_map *) addr, full, db_printf);
}
@@ -374,10 +373,10 @@ db_socket_print_cmd(db_expr_t addr, int
void
db_mount_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
vfs_mount_print((struct mount *) addr, full, db_printf);
}
@@ -385,11 +384,11 @@ db_mount_print_cmd(db_expr_t addr, int h
void
db_show_all_mounts(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
struct mount *mp;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
TAILQ_FOREACH(mp, &mountlist, mnt_list) {
db_printf("mountpoint %p\n", mp);
@@ -401,10 +400,10 @@ extern struct pool vnode_pool;
void
db_show_all_vnodes(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
pool_walk(&vnode_pool, full, db_printf, vfs_vnode_print);
}
@@ -413,10 +412,10 @@ extern struct pool bufpool;
void
db_show_all_bufs(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
pool_walk(&bufpool, full, db_printf, vfs_buf_print);
}
@@ -425,10 +424,10 @@ db_show_all_bufs(db_expr_t addr, int hav
void
db_object_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char
*modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
uvm_object_printit((struct uvm_object *) addr, full, db_printf);
}
@@ -437,10 +436,10 @@ db_object_print_cmd(db_expr_t addr, int
void
db_page_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
uvm_page_printit((struct vm_page *) addr, full, db_printf);
}
@@ -449,10 +448,10 @@ db_page_print_cmd(db_expr_t addr, int ha
void
db_vnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
vfs_vnode_print((void *)addr, full, db_printf);
}
@@ -463,10 +462,10 @@ void
db_nfsreq_print_cmd(db_expr_t addr, int have_addr, db_expr_t count,
char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
nfs_request_print((void *)addr, full, db_printf);
}
@@ -476,10 +475,10 @@ void
db_nfsnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count,
char *modif)
{
- boolean_t full = FALSE;
+ int full = 0;
if (modif[0] == 'f')
- full = TRUE;
+ full = 1;
nfs_node_print((void *)addr, full, db_printf);
}
@@ -843,8 +842,7 @@ db_dmesg_cmd(db_expr_t addr, int haddr,
}
void
-db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
- char *modif)
+db_stack_trace_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
db_stack_trace_print(addr, have_addr, count, modif, db_printf);
}
@@ -878,14 +876,12 @@ db_show_regs(db_expr_t addr, int have_ad
*/
/*ARGSUSED*/
void
-db_write_cmd(db_expr_t address, boolean_t have_addr, db_expr_t count,
- char *modif)
+db_write_cmd(db_expr_t address, int have_addr, db_expr_t count, char *modif)
{
db_addr_t addr;
db_expr_t old_value;
db_expr_t new_value;
- int size;
- boolean_t wrote_one = FALSE;
+ int size, wrote_one = 0;
char tmpfmt[28];
addr = (db_addr_t) address;
@@ -913,7 +909,7 @@ db_write_cmd(db_expr_t address, boolean_
}
while (db_expression(&new_value)) {
- old_value = db_get_value(addr, size, FALSE);
+ old_value = db_get_value(addr, size, 0);
db_printsym(addr, DB_STGY_ANY, db_printf);
db_printf("\t\t%s\t", db_format(tmpfmt, sizeof tmpfmt,
old_value, DB_FORMAT_N, 0, 8));
@@ -922,7 +918,7 @@ db_write_cmd(db_expr_t address, boolean_
db_put_value(addr, size, new_value);
addr += size;
- wrote_one = TRUE;
+ wrote_one = 1;
}
if (!wrote_one) {
Index: ddb/db_examine.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_examine.c,v
retrieving revision 1.24
diff -u -p -r1.24 db_examine.c
--- ddb/db_examine.c 9 Jan 2019 18:11:22 -0000 1.24
+++ ddb/db_examine.c 5 Nov 2019 12:16:30 -0000
@@ -123,13 +123,13 @@ db_examine(db_addr_t addr, char *fmt, in
incr = 0;
break;
case 'r': /* signed, current radix */
- value = db_get_value(addr, size, TRUE);
+ value = db_get_value(addr, size, 1);
db_format(tmpfmt, sizeof tmpfmt,
(long)value, DB_FORMAT_R, 0, width);
db_printf("%-*s", width, tmpfmt);
break;
case 'x': /* unsigned hex */
- value = db_get_value(addr, size, FALSE);
+ value = db_get_value(addr, size, 0);
db_printf("%*lx", width, (long)value);
break;
case 'm': /* hex dump */
@@ -145,7 +145,7 @@ db_examine(db_addr_t addr, char *fmt, in
for (i = 0; i < size; i++) {
value =
db_get_value(addr+bytes, 1,
- FALSE);
+ 0);
db_printf("%02lx",
(long)value);
bytes++;
@@ -159,7 +159,7 @@ db_examine(db_addr_t addr, char *fmt, in
/* Print chars, use . for non-printables */
while (bytes--) {
value = db_get_value(addr + incr, 1,
- FALSE);
+ 0);
incr++;
if (value >= ' ' && value <= '~')
db_printf("%c", (int)value);
@@ -169,25 +169,25 @@ db_examine(db_addr_t addr, char *fmt, in
db_printf("\n");
break;
case 'z': /* signed hex */
- value = db_get_value(addr, size, TRUE);
+ value = db_get_value(addr, size, 1);
db_format(tmpfmt, sizeof tmpfmt,
(long)value, DB_FORMAT_Z, 0, width);
db_printf("%-*s", width, tmpfmt);
break;
case 'd': /* signed decimal */
- value = db_get_value(addr, size, TRUE);
+ value = db_get_value(addr, size, 1);
db_printf("%-*ld", width, (long)value);
break;
case 'u': /* unsigned decimal */
- value = db_get_value(addr, size, FALSE);
+ value = db_get_value(addr, size, 0);
db_printf("%-*lu", width, (long)value);
break;
case 'o': /* unsigned octal */
- value = db_get_value(addr, size, FALSE);
+ value = db_get_value(addr, size, 0);
db_printf("%-*lo", width, value);
break;
case 'c': /* character */
- value = db_get_value(addr, 1, FALSE);
+ value = db_get_value(addr, 1, 0);
incr = 1;
if (value >= ' ' && value <= '~')
db_printf("%c", (int)value);
@@ -198,7 +198,7 @@ db_examine(db_addr_t addr, char *fmt, in
incr = 0;
for (;;) {
value = db_get_value(addr + incr, 1,
- FALSE);
+ 0);
incr++;
if (value == 0)
break;
@@ -220,10 +220,10 @@ db_examine(db_addr_t addr, char *fmt, in
/* if we had a disassembly modifier, do it last */
switch (dis) {
case 'i': /* instruction */
- addr = db_disasm(addr, FALSE);
+ addr = db_disasm(addr, 0);
break;
case 'I': /* instruction, alternate form */
- addr = db_disasm(addr, TRUE);
+ addr = db_disasm(addr, 1);
break;
default:
addr += incr;
@@ -290,7 +290,7 @@ db_print_loc_and_inst(db_addr_t loc)
{
db_printsym(loc, DB_STGY_PROC, db_printf);
db_printf(":\t");
- (void) db_disasm(loc, FALSE);
+ (void) db_disasm(loc, 0);
}
/* local copy is needed here so that we can trace strlcpy() in libkern */
@@ -397,7 +397,7 @@ db_search(db_addr_t addr, int size, db_e
/* Negative counts means forever. */
while (count < 0 || count-- != 0) {
db_prev = addr;
- if ((db_get_value(addr, size, FALSE) & mask) == value)
+ if ((db_get_value(addr, size, 0) & mask) == value)
break;
addr += size;
}
Index: ddb/db_expr.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_expr.c,v
retrieving revision 1.14
diff -u -p -r1.14 db_expr.c
--- ddb/db_expr.c 10 Aug 2017 19:39:38 -0000 1.14
+++ ddb/db_expr.c 5 Nov 2019 12:17:10 -0000
@@ -41,13 +41,13 @@
#include <ddb/db_extern.h>
#include <ddb/db_variables.h>
-boolean_t db_term(db_expr_t *);
-boolean_t db_unary(db_expr_t *);
-boolean_t db_mult_expr(db_expr_t *);
-boolean_t db_add_expr(db_expr_t *);
-boolean_t db_shift_expr(db_expr_t *);
+int db_term(db_expr_t *);
+int db_unary(db_expr_t *);
+int db_mult_expr(db_expr_t *);
+int db_add_expr(db_expr_t *);
+int db_shift_expr(db_expr_t *);
-boolean_t
+int
db_term(db_expr_t *valuep)
{
int t;
@@ -58,32 +58,32 @@ db_term(db_expr_t *valuep)
db_error("Symbol not found\n");
/*NOTREACHED*/
}
- return (TRUE);
+ return 1;
}
if (t == tNUMBER) {
*valuep = db_tok_number;
- return (TRUE);
+ return 1;
}
if (t == tDOT) {
*valuep = (db_expr_t)db_dot;
- return (TRUE);
+ return 1;
}
if (t == tDOTDOT) {
*valuep = (db_expr_t)db_prev;
- return (TRUE);
+ return 1;
}
if (t == tPLUS) {
*valuep = (db_expr_t) db_next;
- return (TRUE);
+ return 1;
}
if (t == tDITTO) {
*valuep = (db_expr_t)db_last_addr;
- return (TRUE);
+ return 1;
}
if (t == tDOLLAR) {
if (!db_get_variable(valuep))
- return (FALSE);
- return (TRUE);
+ return 0;
+ return 1;
}
if (t == tLPAREN) {
if (!db_expression(valuep)) {
@@ -95,13 +95,13 @@ db_term(db_expr_t *valuep)
db_error("Syntax error\n");
/*NOTREACHED*/
}
- return (TRUE);
+ return 1;
}
db_unread_token(t);
- return (FALSE);
+ return 0;
}
-boolean_t
+int
db_unary(db_expr_t *valuep)
{
int t;
@@ -113,7 +113,7 @@ db_unary(db_expr_t *valuep)
/*NOTREACHED*/
}
*valuep = -*valuep;
- return (TRUE);
+ return 1;
}
if (t == tSTAR) {
/* indirection */
@@ -122,20 +122,20 @@ db_unary(db_expr_t *valuep)
/*NOTREACHED*/
}
*valuep = db_get_value((db_addr_t)*valuep, sizeof(db_addr_t),
FALSE);
- return (TRUE);
+ return 1;
}
db_unread_token(t);
return (db_term(valuep));
}
-boolean_t
+int
db_mult_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
if (!db_unary(&lhs))
- return (FALSE);
+ return 0;
t = db_read_token();
while (t == tSTAR || t == tSLASH || t == tPCT || t == tHASH) {
@@ -161,17 +161,17 @@ db_mult_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
- return (TRUE);
+ return 1;
}
-boolean_t
+int
db_add_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
if (!db_mult_expr(&lhs))
- return (FALSE);
+ return 0;
t = db_read_token();
while (t == tPLUS || t == tMINUS) {
@@ -187,17 +187,17 @@ db_add_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
- return (TRUE);
+ return 1;
}
-boolean_t
+int
db_shift_expr(db_expr_t *valuep)
{
db_expr_t lhs, rhs;
int t;
if (!db_add_expr(&lhs))
- return (FALSE);
+ return 0;
t = db_read_token();
while (t == tSHIFT_L || t == tSHIFT_R) {
@@ -219,7 +219,7 @@ db_shift_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
- return (TRUE);
+ return 1;
}
int
Index: ddb/db_extern.h
===================================================================
RCS file: /cvs/src/sys/ddb/db_extern.h,v
retrieving revision 1.19
diff -u -p -r1.19 db_extern.h
--- ddb/db_extern.h 29 May 2017 06:14:10 -0000 1.19
+++ ddb/db_extern.h 5 Nov 2019 12:29:58 -0000
@@ -38,7 +38,7 @@ void ddb_init(void);
/* db_examine.c */
void db_examine_cmd(db_expr_t, int, db_expr_t, char *);
void db_print_cmd(db_expr_t, int, db_expr_t, char *);
-void db_search_cmd(db_expr_t, boolean_t, db_expr_t, char *);
+void db_search_cmd(db_expr_t, int, db_expr_t, char *);
void db_print_loc_and_inst(db_addr_t);
size_t db_strlcpy(char *, const char *, size_t);
Index: ddb/db_input.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_input.c,v
retrieving revision 1.17
diff -u -p -r1.17 db_input.c
--- ddb/db_input.c 2 Apr 2019 10:50:20 -0000 1.17
+++ ddb/db_input.c 5 Nov 2019 12:17:38 -0000
@@ -137,7 +137,7 @@ db_delete_line(void)
} while (0)
#endif
-/* returns TRUE at end-of-line */
+/* returns `1' at end-of-line */
int
db_inputchar(int c)
{
@@ -289,7 +289,7 @@ db_inputchar(int c)
*/
db_history_curr = db_history_last;
*db_le++ = c;
- return TRUE;
+ return 1;
}
}
if (db_le != db_lbuf_start) {
@@ -308,7 +308,7 @@ db_inputchar(int c)
db_history_curr = db_history_last;
#endif
*db_le++ = c;
- return TRUE;
+ return 1;
default:
if (db_le == db_lbuf_end) {
cnputc('\007');
@@ -326,7 +326,7 @@ db_inputchar(int c)
}
break;
}
- return FALSE;
+ return 0;
}
int
Index: ddb/db_interface.h
===================================================================
RCS file: /cvs/src/sys/ddb/db_interface.h,v
retrieving revision 1.20
diff -u -p -r1.20 db_interface.h
--- ddb/db_interface.h 29 Sep 2017 09:36:04 -0000 1.20
+++ ddb/db_interface.h 5 Nov 2019 12:30:02 -0000
@@ -37,7 +37,7 @@ void db_stack_trace_print(db_expr_t, int
int (*)(const char *, ...));
/* arch/<arch>/<arch>/db_disasm.c */
-db_addr_t db_disasm(db_addr_t, boolean_t);
+db_addr_t db_disasm(db_addr_t, int);
/* kern/kern_proc.c */
void db_kill_cmd(db_expr_t, int, db_expr_t, char *);
Index: ddb/db_output.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_output.c,v
retrieving revision 1.32
diff -u -p -r1.32 db_output.c
--- ddb/db_output.c 7 May 2018 15:52:47 -0000 1.32
+++ ddb/db_output.c 5 Nov 2019 12:17:49 -0000
@@ -238,7 +238,7 @@ db_stack_dump(void)
intrace = 1;
printf("Starting stack trace...\n");
- db_stack_trace_print((db_expr_t)__builtin_frame_address(0), TRUE,
+ db_stack_trace_print((db_expr_t)__builtin_frame_address(0), 1,
256 /* low limit */, "", printf);
printf("End of stack trace.\n");
intrace = 0;
Index: ddb/db_run.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_run.c,v
retrieving revision 1.27
diff -u -p -r1.27 db_run.c
--- ddb/db_run.c 30 Apr 2017 13:04:49 -0000 1.27
+++ ddb/db_run.c 5 Nov 2019 12:19:07 -0000
@@ -63,12 +63,12 @@ int db_run_mode;
#define STEP_INVISIBLE 5
#define STEP_COUNT 6
-boolean_t db_sstep_print;
+int db_sstep_print;
int db_loop_count;
int db_call_depth;
-boolean_t
-db_stop_at_pc(db_regs_t *regs, boolean_t *is_breakpoint)
+int
+db_stop_at_pc(db_regs_t *regs, int *is_breakpoint)
{
db_addr_t pc, old_pc;
db_breakpoint_t bkpt;
@@ -96,8 +96,8 @@ db_stop_at_pc(db_regs_t *regs, boolean_t
if (--bkpt->count == 0) {
db_clear_single_step(regs);
bkpt->count = bkpt->init_count;
- *is_breakpoint = TRUE;
- return (TRUE); /* stop here */
+ *is_breakpoint = 1;
+ return 1; /* stop here */
}
} else if (*is_breakpoint
#ifdef SOFTWARE_SSTEP
@@ -117,14 +117,14 @@ db_stop_at_pc(db_regs_t *regs, boolean_t
}
db_clear_single_step(regs);
- *is_breakpoint = FALSE;
+ *is_breakpoint = 0;
if (db_run_mode == STEP_INVISIBLE) {
db_run_mode = STEP_CONTINUE;
- return (FALSE); /* continue */
+ return 0; /* continue */
}
if (db_run_mode == STEP_COUNT) {
- return (FALSE); /* continue */
+ return 0; /* continue */
}
if (db_run_mode == STEP_ONCE) {
if (--db_loop_count > 0) {
@@ -133,11 +133,11 @@ db_stop_at_pc(db_regs_t *regs, boolean_t
db_print_loc_and_inst(pc);
db_printf("\n");
}
- return (FALSE); /* continue */
+ return 0; /* continue */
}
}
if (db_run_mode == STEP_RETURN) {
- db_expr_t ins = db_get_value(pc, sizeof(int), FALSE);
+ db_expr_t ins = db_get_value(pc, sizeof(int), 0);
/* continue until matching return */
@@ -156,25 +156,25 @@ db_stop_at_pc(db_regs_t *regs, boolean_t
}
if (inst_call(ins))
db_call_depth++;
- return (FALSE); /* continue */
+ return 0; /* continue */
}
}
if (db_run_mode == STEP_CALLT) {
- db_expr_t ins = db_get_value(pc, sizeof(int), FALSE);
+ db_expr_t ins = db_get_value(pc, sizeof(int), 0);
/* continue until call or return */
if (!inst_call(ins) && !inst_return(ins) &&
!inst_trap_return(ins)) {
- return (FALSE); /* continue */
+ return 0; /* continue */
}
}
db_run_mode = STEP_NONE;
- return (TRUE);
+ return 1;
}
void
-db_restart_at_pc(db_regs_t *regs, boolean_t watchpt)
+db_restart_at_pc(db_regs_t *regs, int watchpt)
{
db_addr_t pc = PC_REGS(regs);
@@ -186,13 +186,13 @@ db_restart_at_pc(db_regs_t *regs, boolea
* We are about to execute this instruction,
* so count it now.
*/
- ins = db_get_value(pc, sizeof(int), FALSE);
+ ins = db_get_value(pc, sizeof(int), 0);
db_inst_count++;
#ifdef SOFTWARE_SSTEP
/* XXX works on mips, but... */
if (inst_branch(ins) || inst_call(ins)) {
ins = db_get_value(next_instr_address(pc, 1),
- sizeof(int), FALSE);
+ sizeof(int), 0);
db_inst_count++;
}
#endif /* SOFTWARE_SSTEP */
@@ -228,13 +228,13 @@ db_single_step(db_regs_t *regs)
void
db_single_step_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
{
- boolean_t print = FALSE;
+ int print = 0;
if (count == -1)
count = 1;
if (modif[0] == 'p')
- print = TRUE;
+ print = 1;
db_run_mode = STEP_ONCE;
db_loop_count = count;
@@ -250,10 +250,10 @@ void
db_trace_until_call_cmd(db_expr_t addr, int have_addr, db_expr_t count,
char *modif)
{
- boolean_t print = FALSE;
+ int print = 0;
if (modif[0] == 'p')
- print = TRUE;
+ print = 1;
db_run_mode = STEP_CALLT;
db_sstep_print = print;
@@ -267,10 +267,10 @@ void
db_trace_until_matching_cmd(db_expr_t addr, int have_addr, db_expr_t count,
char *modif)
{
- boolean_t print = FALSE;
+ int print = 0;
if (modif[0] == 'p')
- print = TRUE;
+ print = 1;
db_run_mode = STEP_RETURN;
db_call_depth = 1;
@@ -303,7 +303,7 @@ db_continue_cmd(db_expr_t addr, int have
* Just define the above conditional and provide
* the functions/macros defined below.
*
- * extern boolean_t
+ * extern int
* inst_branch(ins), returns true if the instruction might branch
* extern unsigned
* branch_taken(ins, pc, getreg_val, regs),
@@ -338,7 +338,7 @@ db_set_single_step(db_regs_t *regs)
* User was stopped at pc, e.g. the instruction
* at pc was not executed.
*/
- inst = db_get_value(pc, sizeof(int), FALSE);
+ inst = db_get_value(pc, sizeof(int), 0);
if (inst_branch(inst) || inst_call(inst) || inst_return(inst)) {
brpc = branch_taken(inst, pc, getreg_val, regs);
if (brpc != pc) { /* self-branches are hopeless */
Index: ddb/db_run.h
===================================================================
RCS file: /cvs/src/sys/ddb/db_run.h,v
retrieving revision 1.11
diff -u -p -r1.11 db_run.h
--- ddb/db_run.h 25 Jan 2016 14:30:30 -0000 1.11
+++ ddb/db_run.h 5 Nov 2019 12:30:06 -0000
@@ -39,8 +39,8 @@
extern int db_inst_count;
extern int db_cmd_loop_done;
-boolean_t db_stop_at_pc(db_regs_t *, boolean_t *);
-void db_restart_at_pc(db_regs_t *, boolean_t);
+int db_stop_at_pc(db_regs_t *, int *);
+void db_restart_at_pc(db_regs_t *, int);
void db_single_step(db_regs_t *);
#ifndef db_set_single_step
void db_set_single_step(db_regs_t *);
Index: ddb/db_trap.c
===================================================================
RCS file: /cvs/src/sys/ddb/db_trap.c,v
retrieving revision 1.29
diff -u -p -r1.29 db_trap.c
--- ddb/db_trap.c 20 Jul 2019 23:06:51 -0000 1.29
+++ ddb/db_trap.c 5 Nov 2019 12:30:12 -0000
@@ -49,8 +49,8 @@
void
db_trap(int type, int code)
{
- boolean_t bkpt;
- boolean_t watchpt;
+ int bkpt;
+ int watchpt;
bkpt = IS_BREAKPOINT_TRAP(type, code);
watchpt = IS_WATCHPOINT_TRAP(type, code);