ddb: Minor style cleanups.
#define should be followed by tab. MFC after: 1 week
This commit is contained in:
parent
3b453386af
commit
c7aba97241
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#ifndef BKPT_INST_TYPE
|
||||
#define BKPT_INST_TYPE int
|
||||
#define BKPT_INST_TYPE int
|
||||
#endif
|
||||
|
||||
struct db_breakpoint {
|
||||
|
@ -63,8 +63,8 @@ typedef const char * c_db_sym_t; /* const opaque handle on symbols */
|
||||
typedef int db_strategy_t; /* search strategy */
|
||||
|
||||
#define DB_STGY_ANY 0 /* anything goes */
|
||||
#define DB_STGY_XTRN 1 /* only external symbols */
|
||||
#define DB_STGY_PROC 2 /* only procedures */
|
||||
#define DB_STGY_XTRN 1 /* only external symbols */
|
||||
#define DB_STGY_PROC 2 /* only procedures */
|
||||
|
||||
/*
|
||||
* Functions exported by the symtable module
|
||||
@ -78,11 +78,11 @@ c_db_sym_t db_search_symbol(db_addr_t, db_strategy_t, db_expr_t *);
|
||||
void db_symbol_values(c_db_sym_t, const char **, db_expr_t *);
|
||||
/* return name and value of symbol */
|
||||
|
||||
#define db_find_sym_and_offset(val,namep,offp) \
|
||||
#define db_find_sym_and_offset(val,namep,offp) \
|
||||
db_symbol_values(db_search_symbol(val,DB_STGY_ANY,offp),namep,0)
|
||||
/* find name&value given approx val */
|
||||
|
||||
#define db_find_xtrn_sym_and_offset(val,namep,offp) \
|
||||
#define db_find_xtrn_sym_and_offset(val,namep,offp) \
|
||||
db_symbol_values(db_search_symbol(val,DB_STGY_XTRN,offp),namep,0)
|
||||
/* ditto, but no locals */
|
||||
|
||||
|
@ -44,8 +44,8 @@ struct db_variable {
|
||||
db_expr_t *valuep; /* value of variable */
|
||||
/* function to call when reading/writing */
|
||||
db_varfcn_t *fcn;
|
||||
#define DB_VAR_GET 0
|
||||
#define DB_VAR_SET 1
|
||||
#define DB_VAR_GET 0
|
||||
#define DB_VAR_SET 1
|
||||
};
|
||||
#define FCN_NULL ((db_varfcn_t *)0)
|
||||
|
||||
|
@ -118,7 +118,7 @@ struct command {
|
||||
* in modules in which case they will be available only when
|
||||
* the module is loaded.
|
||||
*/
|
||||
#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \
|
||||
#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \
|
||||
static struct command __CONCAT(_name,_suffix) = { \
|
||||
.name = __STRING(_name), \
|
||||
.fcn = _func, \
|
||||
@ -145,27 +145,27 @@ SYSUNINIT(__CONCAT(_name,_suffix), SI_SUB_KLD, SI_ORDER_ANY, \
|
||||
* This macro is mostly used to define commands placed in one of
|
||||
* the ddb command tables; see DB_COMMAND, etc. below.
|
||||
*/
|
||||
#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \
|
||||
#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \
|
||||
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)
|
||||
|
||||
/* common idom provided for backwards compatibility */
|
||||
#define DB_FUNC(_name, _func, list, _flag, _more) \
|
||||
#define DB_FUNC(_name, _func, list, _flag, _more) \
|
||||
_DB_FUNC(_cmd, _name, _func, list, _flag, _more)
|
||||
|
||||
#define DB_COMMAND(cmd_name, func_name) \
|
||||
#define DB_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL)
|
||||
#define DB_ALIAS(alias_name, func_name) \
|
||||
#define DB_ALIAS(alias_name, func_name) \
|
||||
_DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL)
|
||||
#define DB_SHOW_COMMAND(cmd_name, func_name) \
|
||||
#define DB_SHOW_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL)
|
||||
#define DB_SHOW_ALIAS(alias_name, func_name) \
|
||||
#define DB_SHOW_ALIAS(alias_name, func_name) \
|
||||
_DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL)
|
||||
#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
|
||||
#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL)
|
||||
#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \
|
||||
#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \
|
||||
_DB_SET(_show_all, alias_name, func_name, db_show_all_table, 0, NULL)
|
||||
|
||||
extern db_expr_t db_maxoff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user