Skip to content

Commit

Permalink
ddb: Use NULL for pointers
Browse files Browse the repository at this point in the history
Hinted by:	DragonflyBSD
  • Loading branch information
pgiffuni committed May 22, 2015
1 parent 8d12129 commit 7fb8885
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions sys/ddb/db_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,67 +80,67 @@ static db_cmdfcn_t db_watchdog;
*/

static struct command db_show_all_cmds[] = {
{ "trace", db_stack_trace_all, 0, 0 },
{ "trace", db_stack_trace_all, 0, NULL },
};
struct command_table db_show_all_table =
LIST_HEAD_INITIALIZER(db_show_all_table);

static struct command db_show_cmds[] = {
{ "all", 0, 0, &db_show_all_table },
{ "registers", db_show_regs, 0, 0 },
{ "breaks", db_listbreak_cmd, 0, 0 },
{ "threads", db_show_threads, 0, 0 },
{ "registers", db_show_regs, 0, NULL },
{ "breaks", db_listbreak_cmd, 0, NULL },
{ "threads", db_show_threads, 0, NULL },
};
struct command_table db_show_table = LIST_HEAD_INITIALIZER(db_show_table);

static struct command db_cmds[] = {
{ "print", db_print_cmd, 0, 0 },
{ "p", db_print_cmd, 0, 0 },
{ "examine", db_examine_cmd, CS_SET_DOT, 0 },
{ "x", db_examine_cmd, CS_SET_DOT, 0 },
{ "search", db_search_cmd, CS_OWN|CS_SET_DOT, 0 },
{ "set", db_set_cmd, CS_OWN, 0 },
{ "write", db_write_cmd, CS_MORE|CS_SET_DOT, 0 },
{ "w", db_write_cmd, CS_MORE|CS_SET_DOT, 0 },
{ "delete", db_delete_cmd, 0, 0 },
{ "d", db_delete_cmd, 0, 0 },
{ "dump", db_dump, 0, 0 },
{ "break", db_breakpoint_cmd, 0, 0 },
{ "b", db_breakpoint_cmd, 0, 0 },
{ "dwatch", db_deletewatch_cmd, 0, 0 },
{ "watch", db_watchpoint_cmd, CS_MORE,0 },
{ "dhwatch", db_deletehwatch_cmd, 0, 0 },
{ "hwatch", db_hwatchpoint_cmd, 0, 0 },
{ "step", db_single_step_cmd, 0, 0 },
{ "s", db_single_step_cmd, 0, 0 },
{ "continue", db_continue_cmd, 0, 0 },
{ "c", db_continue_cmd, 0, 0 },
{ "until", db_trace_until_call_cmd,0, 0 },
{ "next", db_trace_until_matching_cmd,0, 0 },
{ "match", db_trace_until_matching_cmd,0, 0 },
{ "trace", db_stack_trace, CS_OWN, 0 },
{ "t", db_stack_trace, CS_OWN, 0 },
{ "print", db_print_cmd, 0, NULL },
{ "p", db_print_cmd, 0, NULL },
{ "examine", db_examine_cmd, CS_SET_DOT, NULL },
{ "x", db_examine_cmd, CS_SET_DOT, NULL },
{ "search", db_search_cmd, CS_OWN|CS_SET_DOT, NULL },
{ "set", db_set_cmd, CS_OWN, NULL },
{ "write", db_write_cmd, CS_MORE|CS_SET_DOT, NULL },
{ "w", db_write_cmd, CS_MORE|CS_SET_DOT, NULL },
{ "delete", db_delete_cmd, 0, NULL },
{ "d", db_delete_cmd, 0, NULL },
{ "dump", db_dump, 0, NULL },
{ "break", db_breakpoint_cmd, 0, NULL },
{ "b", db_breakpoint_cmd, 0, NULL },
{ "dwatch", db_deletewatch_cmd, 0, NULL },
{ "watch", db_watchpoint_cmd, CS_MORE,NULL },
{ "dhwatch", db_deletehwatch_cmd, 0, NULL },
{ "hwatch", db_hwatchpoint_cmd, 0, NULL },
{ "step", db_single_step_cmd, 0, NULL },
{ "s", db_single_step_cmd, 0, NULL },
{ "continue", db_continue_cmd, 0, NULL },
{ "c", db_continue_cmd, 0, NULL },
{ "until", db_trace_until_call_cmd,0, NULL },
{ "next", db_trace_until_matching_cmd,0, NULL },
{ "match", db_trace_until_matching_cmd,0, NULL },
{ "trace", db_stack_trace, CS_OWN, NULL },
{ "t", db_stack_trace, CS_OWN, NULL },
/* XXX alias for all trace */
{ "alltrace", db_stack_trace_all, 0, 0 },
{ "where", db_stack_trace, CS_OWN, 0 },
{ "bt", db_stack_trace, CS_OWN, 0 },
{ "call", db_fncall, CS_OWN, 0 },
{ "alltrace", db_stack_trace_all, 0, NULL },
{ "where", db_stack_trace, CS_OWN, NULL },
{ "bt", db_stack_trace, CS_OWN, NULL },
{ "call", db_fncall, CS_OWN, NULL },
{ "show", 0, 0, &db_show_table },
{ "ps", db_ps, 0, 0 },
{ "gdb", db_gdb, 0, 0 },
{ "halt", db_halt, 0, 0 },
{ "reboot", db_reset, 0, 0 },
{ "reset", db_reset, 0, 0 },
{ "kill", db_kill, CS_OWN, 0 },
{ "watchdog", db_watchdog, CS_OWN, 0 },
{ "thread", db_set_thread, CS_OWN, 0 },
{ "run", db_run_cmd, CS_OWN, 0 },
{ "script", db_script_cmd, CS_OWN, 0 },
{ "scripts", db_scripts_cmd, 0, 0 },
{ "unscript", db_unscript_cmd, CS_OWN, 0 },
{ "capture", db_capture_cmd, CS_OWN, 0 },
{ "textdump", db_textdump_cmd, CS_OWN, 0 },
{ "findstack", db_findstack_cmd, 0, 0 },
{ "ps", db_ps, 0, NULL },
{ "gdb", db_gdb, 0, NULL },
{ "halt", db_halt, 0, NULL },
{ "reboot", db_reset, 0, NULL },
{ "reset", db_reset, 0, NULL },
{ "kill", db_kill, CS_OWN, NULL },
{ "watchdog", db_watchdog, CS_OWN, NULL },
{ "thread", db_set_thread, CS_OWN, NULL },
{ "run", db_run_cmd, CS_OWN, NULL },
{ "script", db_script_cmd, CS_OWN, NULL },
{ "scripts", db_scripts_cmd, 0, NULL },
{ "unscript", db_unscript_cmd, CS_OWN, NULL },
{ "capture", db_capture_cmd, CS_OWN, NULL },
{ "textdump", db_textdump_cmd, CS_OWN, NULL },
{ "findstack", db_findstack_cmd, 0, NULL },
};
struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);

Expand Down

0 comments on commit 7fb8885

Please sign in to comment.