Minor clenaup - db_cmd_loop_done is a bool nowadays, so use true/false
instead of 0/1. Also make db_init_commands() non-static.
This commit is contained in:
parent
a379e55c78
commit
34bb6e19fd
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_command.c,v 1.101 2007/09/23 19:51:20 martin Exp $ */
|
||||
/* $NetBSD: db_command.c,v 1.102 2007/09/23 23:55:54 martin Exp $ */
|
||||
/*
|
||||
* Mach Operating System
|
||||
* Copyright (c) 1991,1990 Carnegie Mellon University
|
||||
@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.101 2007/09/23 19:51:20 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.102 2007/09/23 23:55:54 martin Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -174,7 +174,6 @@ static void db_event_print_cmd(db_expr_t, bool, db_expr_t, const char *);
|
||||
static void db_fncall(db_expr_t, bool, db_expr_t, const char *);
|
||||
static int db_get_list_type(const char *);
|
||||
static void db_help_print_cmd(db_expr_t, bool, db_expr_t, const char *);
|
||||
static void db_init_commands(void);
|
||||
static void db_lock_print_cmd(db_expr_t, bool, db_expr_t, const char *);
|
||||
static void db_mount_print_cmd(db_expr_t, bool, db_expr_t, const char *);
|
||||
static void db_mbuf_print_cmd(db_expr_t, bool, db_expr_t, const char *);
|
||||
@ -398,7 +397,7 @@ db_execute_commandlist(const char *cmdlist)
|
||||
}
|
||||
|
||||
/*Initialize ddb command tables*/
|
||||
static void
|
||||
void
|
||||
db_init_commands(void)
|
||||
{
|
||||
static bool done = false;
|
||||
@ -546,11 +545,11 @@ db_command_loop(void)
|
||||
db_prev = db_dot;
|
||||
db_next = db_dot;
|
||||
|
||||
db_cmd_loop_done = 0;
|
||||
db_cmd_loop_done = false;
|
||||
|
||||
/*Init default command tables add machine, base,
|
||||
show command tables to the list*/
|
||||
(void) db_init_commands();
|
||||
db_init_commands();
|
||||
|
||||
/*save context for return from ddb*/
|
||||
savejmp = db_recover;
|
||||
@ -728,7 +727,7 @@ db_get_list_type(const char *name)
|
||||
ret=DDB_BASE_CMD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_command.h,v 1.28 2007/09/22 18:40:27 martin Exp $ */
|
||||
/* $NetBSD: db_command.h,v 1.29 2007/09/23 23:55:54 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc.
|
||||
@ -69,6 +69,7 @@
|
||||
#define _DDB_COMMAND_
|
||||
|
||||
void db_skip_to_eol(void);
|
||||
void db_init_commands(void);
|
||||
void db_command_loop(void);
|
||||
void db_error(const char *) __attribute__((__noreturn__));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: db_run.c,v 1.30 2007/02/22 06:41:01 thorpej Exp $ */
|
||||
/* $NetBSD: db_run.c,v 1.31 2007/09/23 23:55:55 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Mach Operating System
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_run.c,v 1.30 2007/02/22 06:41:01 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_run.c,v 1.31 2007/09/23 23:55:55 martin Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -270,7 +270,7 @@ db_single_step_cmd(db_expr_t addr, bool have_addr,
|
||||
db_load_count = 0;
|
||||
db_store_count = 0;
|
||||
|
||||
db_cmd_loop_done = 1;
|
||||
db_cmd_loop_done = true;
|
||||
}
|
||||
|
||||
/* trace and print until call/return */
|
||||
@ -290,7 +290,7 @@ db_trace_until_call_cmd(db_expr_t addr, bool have_addr,
|
||||
db_load_count = 0;
|
||||
db_store_count = 0;
|
||||
|
||||
db_cmd_loop_done = 1;
|
||||
db_cmd_loop_done = true;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@ -310,7 +310,7 @@ db_trace_until_matching_cmd(db_expr_t addr, bool have_addr,
|
||||
db_load_count = 0;
|
||||
db_store_count = 0;
|
||||
|
||||
db_cmd_loop_done = 1;
|
||||
db_cmd_loop_done = true;
|
||||
}
|
||||
|
||||
/* continue */
|
||||
@ -328,7 +328,7 @@ db_continue_cmd(db_expr_t addr, bool have_addr,
|
||||
db_load_count = 0;
|
||||
db_store_count = 0;
|
||||
|
||||
db_cmd_loop_done = 1;
|
||||
db_cmd_loop_done = true;
|
||||
}
|
||||
#endif /* DDB */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user