Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2015 15:16:19 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283248 - in head/sys: amd64/amd64 arm/arm arm64/arm64 ddb i386/i386 kern mips/mips powerpc/powerpc sparc64/sparc64
Message-ID:  <201505211516.t4LFGJrS054255@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Thu May 21 15:16:18 2015
New Revision: 283248
URL: https://svnweb.freebsd.org/changeset/base/283248

Log:
  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

Modified:
  head/sys/amd64/amd64/db_disasm.c
  head/sys/arm/arm/db_disasm.c
  head/sys/arm64/arm64/db_disasm.c
  head/sys/ddb/db_access.c
  head/sys/ddb/db_access.h
  head/sys/ddb/db_break.c
  head/sys/ddb/db_capture.c
  head/sys/ddb/db_command.c
  head/sys/ddb/db_examine.c
  head/sys/ddb/db_expr.c
  head/sys/ddb/db_main.c
  head/sys/ddb/db_print.c
  head/sys/ddb/db_ps.c
  head/sys/ddb/db_run.c
  head/sys/ddb/db_script.c
  head/sys/ddb/db_sym.c
  head/sys/ddb/db_sym.h
  head/sys/ddb/db_textdump.c
  head/sys/ddb/db_thread.c
  head/sys/ddb/db_variables.c
  head/sys/ddb/db_watch.c
  head/sys/ddb/db_write_cmd.c
  head/sys/ddb/ddb.h
  head/sys/i386/i386/db_disasm.c
  head/sys/kern/subr_turnstile.c
  head/sys/kern/subr_witness.c
  head/sys/mips/mips/db_disasm.c
  head/sys/mips/mips/pmap.c
  head/sys/mips/mips/vm_machdep.c
  head/sys/powerpc/powerpc/db_disasm.c
  head/sys/sparc64/sparc64/db_disasm.c

Modified: head/sys/amd64/amd64/db_disasm.c
==============================================================================
--- head/sys/amd64/amd64/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/amd64/amd64/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -1223,9 +1223,7 @@ db_disasm_esc(loc, inst, rex, short_addr
  * 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;

Modified: head/sys/arm/arm/db_disasm.c
==============================================================================
--- head/sys/arm/arm/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/arm/arm/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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);

Modified: head/sys/arm64/arm64/db_disasm.c
==============================================================================
--- head/sys/arm64/arm64/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/arm64/arm64/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;
 }

Modified: head/sys/ddb/db_access.c
==============================================================================
--- head/sys/ddb/db_access.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_access.c	Thu May 21 15:16:18 2015	(r283248)
@@ -54,7 +54,7 @@ static unsigned db_extend[] = {	/* table
 #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;

Modified: head/sys/ddb/db_access.h
==============================================================================
--- head/sys/ddb/db_access.h	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_access.h	Thu May 21 15:16:18 2015	(r283248)
@@ -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_ */

Modified: head/sys/ddb/db_break.c
==============================================================================
--- head/sys/ddb/db_break.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_break.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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 
 /* 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, boolea
 
 /* 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, boole
  *	(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 map
 		((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
 }
 

Modified: head/sys/ddb/db_capture.c
==============================================================================
--- head/sys/ddb/db_capture.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_capture.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;
 

Modified: head/sys/ddb/db_command.c
==============================================================================
--- head/sys/ddb/db_command.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_command.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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 =
  * 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, s
 	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, s
 	    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_exp
 }
 
 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 du
 }
 
 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_
 }
 
 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 
 }
 
 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 dummy
 }
 
 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 
 }
 
 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;

Modified: head/sys/ddb/db_examine.c
==============================================================================
--- head/sys/ddb/db_examine.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_examine.c	Thu May 21 15:16:18 2015	(r283248)
@@ -52,8 +52,7 @@ static void	db_search(db_addr_t, int, db
  */
 /*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;

Modified: head/sys/ddb/db_expr.c
==============================================================================
--- head/sys/ddb/db_expr.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_expr.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;

Modified: head/sys/ddb/db_main.c
==============================================================================
--- head/sys/ddb/db_main.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_main.c	Thu May 21 15:16:18 2015	(r283248)
@@ -63,7 +63,7 @@ KDB_BACKEND(ddb, db_init, db_trace_self_
  */
 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, 
 	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;
 
 	/*

Modified: head/sys/ddb/db_print.c
==============================================================================
--- head/sys/ddb/db_print.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_print.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;

Modified: head/sys/ddb/db_ps.c
==============================================================================
--- head/sys/ddb/db_ps.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_ps.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;

Modified: head/sys/ddb/db_run.c
==============================================================================
--- head/sys/ddb/db_run.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_run.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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, coun
 /* 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, 
 
 /*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 ad
 /* 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;

Modified: head/sys/ddb/db_script.c
==============================================================================
--- head/sys/ddb/db_script.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_script.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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
  * 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 hav
  * 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 
  * 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;

Modified: head/sys/ddb/db_sym.c
==============================================================================
--- head/sys/ddb/db_sym.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_sym.c	Thu May 21 15:16:18 2015	(r283248)
@@ -58,8 +58,8 @@ static db_symtab_t	*db_last_symtab; /* w
 
 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 *symtabn
 }
 
 
-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 *d
 	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_ex
 	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, 
 	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
 	}
 }
 
-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));
 }

Modified: head/sys/ddb/db_sym.h
==============================================================================
--- head/sys/ddb/db_sym.h	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_sym.h	Thu May 21 15:16:18 2015	(r283248)
@@ -86,20 +86,20 @@ void		db_symbol_values(c_db_sym_t, const
 	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);
 

Modified: head/sys/ddb/db_textdump.c
==============================================================================
--- head/sys/ddb/db_textdump.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_textdump.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;
 

Modified: head/sys/ddb/db_thread.c
==============================================================================
--- head/sys/ddb/db_thread.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_thread.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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 h
 }
 
 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_
  * 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;

Modified: head/sys/ddb/db_variables.c
==============================================================================
--- head/sys/ddb/db_variables.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_variables.c	Thu May 21 15:16:18 2015	(r283248)
@@ -128,7 +128,7 @@ db_write_variable(struct db_variable *vp
 }
 
 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;

Modified: head/sys/ddb/db_watch.c
==============================================================================
--- head/sys/ddb/db_watch.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_watch.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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_all
 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, boole
 /* 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
 /* 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, bool
 /* 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;

Modified: head/sys/ddb/db_write_cmd.c
==============================================================================
--- head/sys/ddb/db_write_cmd.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/db_write_cmd.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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_
 	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;
 

Modified: head/sys/ddb/ddb.h
==============================================================================
--- head/sys/ddb/ddb.h	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/ddb/ddb.h	Thu May 21 15:16:18 2015	(r283248)
@@ -101,7 +101,7 @@ extern struct command_table db_show_all_
 /*
  * 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_SU
 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, ...) __p
 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 *);

Modified: head/sys/i386/i386/db_disasm.c
==============================================================================
--- head/sys/i386/i386/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/i386/i386/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -1148,9 +1148,7 @@ db_disasm_esc(loc, inst, short_addr, siz
  * 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;

Modified: head/sys/kern/subr_turnstile.c
==============================================================================
--- head/sys/kern/subr_turnstile.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/kern/subr_turnstile.c	Thu May 21 15:16:18 2015	(r283248)
@@ -1151,7 +1151,7 @@ DB_SHOW_COMMAND(lockchain, db_show_lockc
 
 	/* 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_slee
 
 	/* 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;
 

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/kern/subr_witness.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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);

Modified: head/sys/mips/mips/db_disasm.c
==============================================================================
--- head/sys/mips/mips/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/mips/mips/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/mips/mips/pmap.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;

Modified: head/sys/mips/mips/vm_machdep.c
==============================================================================
--- head/sys/mips/mips/vm_machdep.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/mips/mips/vm_machdep.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;
 	

Modified: head/sys/powerpc/powerpc/db_disasm.c
==============================================================================
--- head/sys/powerpc/powerpc/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/powerpc/powerpc/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -936,7 +936,7 @@ dis_ppc(const struct opcode *opcodeset, 
 }
 
 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;

Modified: head/sys/sparc64/sparc64/db_disasm.c
==============================================================================
--- head/sys/sparc64/sparc64/db_disasm.c	Thu May 21 15:05:46 2015	(r283247)
+++ head/sys/sparc64/sparc64/db_disasm.c	Thu May 21 15:16:18 2015	(r283248)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505211516.t4LFGJrS054255>