diff options
author | 2016-04-19 12:23:25 +0000 | |
---|---|---|
committer | 2016-04-19 12:23:25 +0000 | |
commit | d6f4c7643b76aadbe2ac61b40ccef0cf6a3058ef (patch) | |
tree | 2e4aefc18215f78b42293dc7361bb1eb04f33927 | |
parent | Start reducing the dependence on <uvm/uvm_param.h> by using int-1-0 (diff) | |
download | wireguard-openbsd-d6f4c7643b76aadbe2ac61b40ccef0cf6a3058ef.tar.xz wireguard-openbsd-d6f4c7643b76aadbe2ac61b40ccef0cf6a3058ef.zip |
Do not expose private functions.
-rw-r--r-- | sys/ddb/db_break.c | 8 | ||||
-rw-r--r-- | sys/ddb/db_break.h | 7 | ||||
-rw-r--r-- | sys/ddb/db_command.c | 39 | ||||
-rw-r--r-- | sys/ddb/db_command.h | 42 | ||||
-rw-r--r-- | sys/ddb/db_examine.c | 5 | ||||
-rw-r--r-- | sys/ddb/db_expr.c | 8 | ||||
-rw-r--r-- | sys/ddb/db_extern.h | 16 | ||||
-rw-r--r-- | sys/ddb/db_input.c | 8 | ||||
-rw-r--r-- | sys/ddb/db_lex.c | 6 | ||||
-rw-r--r-- | sys/ddb/db_lex.h | 5 |
10 files changed, 75 insertions, 69 deletions
diff --git a/sys/ddb/db_break.c b/sys/ddb/db_break.c index 976384c673e..f33fab11778 100644 --- a/sys/ddb/db_break.c +++ b/sys/ddb/db_break.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_break.c,v 1.19 2016/04/19 10:24:42 mpi Exp $ */ +/* $OpenBSD: db_break.c,v 1.20 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_break.c,v 1.7 1996/03/30 22:30:03 christos Exp $ */ /* @@ -49,6 +49,12 @@ db_breakpoint_t db_next_free_breakpoint = &db_break_table[0]; db_breakpoint_t db_free_breakpoints = 0; db_breakpoint_t db_breakpoint_list = 0; +db_breakpoint_t db_breakpoint_alloc(void); +void db_breakpoint_free(db_breakpoint_t); +void db_set_breakpoint(db_addr_t, int); +void db_delete_breakpoint(db_addr_t); +void db_list_breakpoints(void); + db_breakpoint_t db_breakpoint_alloc(void) { diff --git a/sys/ddb/db_break.h b/sys/ddb/db_break.h index 4f11106d63e..1c44a7f6093 100644 --- a/sys/ddb/db_break.h +++ b/sys/ddb/db_break.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_break.h,v 1.10 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_break.h,v 1.11 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_break.h,v 1.8 1996/02/05 01:56:52 christos Exp $ */ /* @@ -49,16 +49,11 @@ typedef struct db_breakpoint { struct db_breakpoint *link; /* link in in-use or free chain */ } *db_breakpoint_t; -db_breakpoint_t db_breakpoint_alloc(void); -void db_breakpoint_free(db_breakpoint_t); -void db_set_breakpoint(db_addr_t, int); -void db_delete_breakpoint(db_addr_t); db_breakpoint_t db_find_breakpoint(db_addr_t); void db_set_breakpoints(void); void db_clear_breakpoints(void); db_breakpoint_t db_set_temp_breakpoint(db_addr_t); void db_delete_temp_breakpoint(db_breakpoint_t); -void db_list_breakpoints(void); void db_delete_cmd(db_expr_t, int, db_expr_t, char *); void db_breakpoint_cmd(db_expr_t, int, db_expr_t, char *); void db_listbreak_cmd(db_expr_t, int, db_expr_t, char *); diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 52cc29010c7..0796df039bb 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.70 2016/04/19 10:12:36 mpi Exp $ */ +/* $OpenBSD: db_command.c,v 1.71 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -77,8 +77,41 @@ db_addr_t db_prev; /* last address examined db_addr_t db_next; /* next address to be examined or written */ -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 *); +int db_cmd_search(char *, struct db_command *, struct db_command **); +void db_cmd_list(struct db_command *); +void db_map_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_buf_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_malloc_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_mbuf_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_mount_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_show_all_mounts(db_expr_t, int, db_expr_t, char *); +void db_show_all_vnodes(db_expr_t, int, db_expr_t, char *); +void db_show_all_bufs(db_expr_t, int, db_expr_t, char *); +void db_object_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_page_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_extent_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_pool_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_proc_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_uvmexp_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_vnode_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_nfsreq_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_nfsnode_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_help_cmd(db_expr_t, int, db_expr_t, char *); +void db_fncall(db_expr_t, int, db_expr_t, char *); +void db_boot_sync_cmd(db_expr_t, int, db_expr_t, char *); +void db_boot_crash_cmd(db_expr_t, int, db_expr_t, char *); +void db_boot_dump_cmd(db_expr_t, int, db_expr_t, char *); +void db_boot_halt_cmd(db_expr_t, int, db_expr_t, char *); +void db_boot_reboot_cmd(db_expr_t, int, db_expr_t, char *); +void db_boot_poweroff_cmd(db_expr_t, int, db_expr_t, char *); +void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *); +void db_dmesg_cmd(db_expr_t, int, db_expr_t, char *); +void db_show_panic_cmd(db_expr_t, int, db_expr_t, char *); +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_struct_layout_cmd(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 *); /* diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index 0803aae41ac..b2785f189f6 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.31 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_command.h,v 1.32 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -33,45 +33,13 @@ /* * Command loop declarations. */ -void db_skip_to_eol(void); struct db_command; -int db_cmd_search(char *, struct db_command *, struct db_command **); -void db_cmd_list(struct db_command *); + +void db_error(char *); +void db_skip_to_eol(void); +void db_command_loop(void); void db_command(struct db_command **, struct db_command *); -void db_buf_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_map_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_malloc_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_mbuf_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_mount_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_show_all_mounts(db_expr_t, int, db_expr_t, char *); -void db_show_all_vnodes(db_expr_t, int, db_expr_t, char *); -void db_show_all_bufs(db_expr_t, int, db_expr_t, char *); -void db_object_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_page_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_extent_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_pool_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_proc_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_uvmexp_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_vnode_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_nfsreq_print_cmd(db_expr_t, int, db_expr_t, char *); -void db_nfsnode_print_cmd(db_expr_t, int, db_expr_t, char *); void db_machine_commands_install(struct db_command *); -void db_help_cmd(db_expr_t, int, db_expr_t, char *); -void db_command_loop(void); -void db_error(char *); -void db_fncall(db_expr_t, int, db_expr_t, char *); -void db_boot_sync_cmd(db_expr_t, int, db_expr_t, char *); -void db_boot_crash_cmd(db_expr_t, int, db_expr_t, char *); -void db_boot_dump_cmd(db_expr_t, int, db_expr_t, char *); -void db_boot_halt_cmd(db_expr_t, int, db_expr_t, char *); -void db_boot_reboot_cmd(db_expr_t, int, db_expr_t, char *); -void db_boot_poweroff_cmd(db_expr_t, int, db_expr_t, char *); -void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *); -void db_dmesg_cmd(db_expr_t, int, db_expr_t, char *); -void db_show_panic_cmd(db_expr_t, int, db_expr_t, char *); -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_struct_layout_cmd(db_expr_t, int, db_expr_t, char *); extern db_addr_t db_dot, db_last_addr, db_prev, db_next; diff --git a/sys/ddb/db_examine.c b/sys/ddb/db_examine.c index eda9ccee248..5ab05a75c30 100644 --- a/sys/ddb/db_examine.c +++ b/sys/ddb/db_examine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_examine.c,v 1.20 2014/09/14 14:17:24 jsg Exp $ */ +/* $OpenBSD: db_examine.c,v 1.21 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_examine.c,v 1.11 1996/03/30 22:30:07 christos Exp $ */ /* @@ -45,6 +45,9 @@ char db_examine_format[TOK_STRING_SIZE] = "x"; +void db_examine(db_addr_t, char *, int); +void db_search(db_addr_t, int, db_expr_t, db_expr_t, db_expr_t); + /* * Examine (print) data. Syntax is: * x/[bhlq][cdiorsuxz]* diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c index 8eddf3fd282..387df7cb0b0 100644 --- a/sys/ddb/db_expr.c +++ b/sys/ddb/db_expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_expr.c,v 1.12 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_expr.c,v 1.13 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_expr.c,v 1.5 1996/02/05 01:56:58 christos Exp $ */ /* @@ -41,6 +41,12 @@ #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 *); + boolean_t db_term(db_expr_t *valuep) { diff --git a/sys/ddb/db_extern.h b/sys/ddb/db_extern.h index e5ce46a5357..b935cec99fa 100644 --- a/sys/ddb/db_extern.h +++ b/sys/ddb/db_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_extern.h,v 1.15 2016/04/19 10:12:36 mpi Exp $ */ +/* $OpenBSD: db_extern.h,v 1.16 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_extern.h,v 1.1 1996/02/05 01:57:00 christos Exp $ */ /* @@ -37,30 +37,18 @@ void ddb_init(void); /* db_examine.c */ void db_examine_cmd(db_expr_t, int, db_expr_t, char *); -void db_examine(db_addr_t, char *, int); 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_print_loc_and_inst(db_addr_t); size_t db_strlcpy(char *, const char *, size_t); -void db_search_cmd(db_expr_t, boolean_t, db_expr_t, char *); -void db_search(db_addr_t, int, db_expr_t, db_expr_t, db_expr_t); /* db_expr.c */ -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_expression(db_expr_t *); /* db_hangman.c */ void db_hangman(db_expr_t, int, db_expr_t, char *); /* db_input.c */ -void db_putstring(char *, int); -void db_putnchars(int, int); -void db_delete(int, int); -void db_delete_line(void); -int db_inputchar(int); int db_readline(char *, int); /* db_trap.c */ diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c index 2adae7316de..51cb939e173 100644 --- a/sys/ddb/db_input.c +++ b/sys/ddb/db_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_input.c,v 1.15 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_input.c,v 1.16 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_input.c,v 1.7 1996/02/05 01:57:02 christos Exp $ */ /* @@ -46,6 +46,12 @@ * Character input and editing. */ +void db_putstring(char *, int); +void db_putnchars(int, int); +void db_delete(int, int); +void db_delete_line(void); +int db_inputchar(int); + /* * We don't track output position while editing input, * since input always ends with a new-line. We just diff --git a/sys/ddb/db_lex.c b/sys/ddb/db_lex.c index 6f9e25a2cfe..eee0e0b5190 100644 --- a/sys/ddb/db_lex.c +++ b/sys/ddb/db_lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_lex.c,v 1.13 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_lex.c,v 1.14 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_lex.c,v 1.8 1996/02/05 01:57:05 christos Exp $ */ /* @@ -50,6 +50,10 @@ char * db_lp, *db_endlp; db_expr_t db_tok_number; char db_tok_string[TOK_STRING_SIZE]; +void db_flush_line(void); +int db_read_char(void); +void db_unread_char(int); + int db_read_line(void) { diff --git a/sys/ddb/db_lex.h b/sys/ddb/db_lex.h index 359e7493d86..3ab70ae3618 100644 --- a/sys/ddb/db_lex.h +++ b/sys/ddb/db_lex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_lex.h,v 1.8 2016/01/25 14:30:30 mpi Exp $ */ +/* $OpenBSD: db_lex.h,v 1.9 2016/04/19 12:23:25 mpi Exp $ */ /* $NetBSD: db_lex.h,v 1.7 1996/02/05 01:57:07 christos Exp $ */ /* @@ -34,9 +34,6 @@ * Lexical analyzer. */ int db_read_line(void); -void db_flush_line(void); -int db_read_char(void); -void db_unread_char(int); void db_unread_token(int); int db_read_token(void); void db_flush_lex(void); |