ddb.h (272098) | ddb.h (283248) |
---|---|
1/*- 2 * Copyright (c) 1993, Garrett A. Wollman. 3 * Copyright (c) 1993, University of Vermont and State Agricultural College. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * | 1/*- 2 * Copyright (c) 1993, Garrett A. Wollman. 3 * Copyright (c) 1993, University of Vermont and State Agricultural College. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sys/ddb/ddb.h 272098 2014-09-25 08:28:10Z royger $ | 30 * $FreeBSD: head/sys/ddb/ddb.h 283248 2015-05-21 15:16:18Z pfg $ |
31 */ 32 33/* 34 * Necessary declarations for the `ddb' kernel debugger. 35 */ 36 37#ifndef _DDB_DDB_H_ 38#define _DDB_DDB_H_ --- 57 unchanged lines hidden (view full) --- 96LIST_HEAD(command_table, command); 97extern struct command_table db_cmd_table; 98extern struct command_table db_show_table; 99extern struct command_table db_show_all_table; 100 101/* 102 * Type signature for a function implementing a ddb command. 103 */ | 31 */ 32 33/* 34 * Necessary declarations for the `ddb' kernel debugger. 35 */ 36 37#ifndef _DDB_DDB_H_ 38#define _DDB_DDB_H_ --- 57 unchanged lines hidden (view full) --- 96LIST_HEAD(command_table, command); 97extern struct command_table db_cmd_table; 98extern struct command_table db_show_table; 99extern struct command_table db_show_all_table; 100 101/* 102 * Type signature for a function implementing a ddb command. 103 */ |
104typedef void db_cmdfcn_t(db_expr_t addr, boolean_t have_addr, db_expr_t count, | 104typedef void db_cmdfcn_t(db_expr_t addr, bool have_addr, db_expr_t count, |
105 char *modif); 106 107/* 108 * Command table entry. 109 */ 110struct command { 111 char * name; /* command name */ 112 db_cmdfcn_t *fcn; /* function to call */ --- 38 unchanged lines hidden (view full) --- 151 * 152 * This macro is mostly used to define commands placed in one of 153 * the ddb command tables; see DB_COMMAND, etc. below. 154 */ 155#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ 156static db_cmdfcn_t _func; \ 157_DB_SET(_suffix, _name, _func, list, _flag, _more); \ 158static void \ | 105 char *modif); 106 107/* 108 * Command table entry. 109 */ 110struct command { 111 char * name; /* command name */ 112 db_cmdfcn_t *fcn; /* function to call */ --- 38 unchanged lines hidden (view full) --- 151 * 152 * This macro is mostly used to define commands placed in one of 153 * the ddb command tables; see DB_COMMAND, etc. below. 154 */ 155#define _DB_FUNC(_suffix, _name, _func, list, _flag, _more) \ 156static db_cmdfcn_t _func; \ 157_DB_SET(_suffix, _name, _func, list, _flag, _more); \ 158static void \ |
159_func(db_expr_t addr, boolean_t have_addr, db_expr_t count, char *modif) | 159_func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) |
160 161/* common idom provided for backwards compatibility */ 162#define DB_FUNC(_name, _func, list, _flag, _more) \ 163 _DB_FUNC(_cmd, _name, _func, list, _flag, _more) 164 165#define DB_COMMAND(cmd_name, func_name) \ 166 _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL) 167#define DB_ALIAS(alias_name, func_name) \ --- 18 unchanged lines hidden (view full) --- 186extern db_expr_t db_tab_stop_width; 187extern db_expr_t db_lines_per_page; 188 189struct thread; 190struct vm_map; 191 192void db_check_interrupt(void); 193void db_clear_watchpoints(void); | 160 161/* common idom provided for backwards compatibility */ 162#define DB_FUNC(_name, _func, list, _flag, _more) \ 163 _DB_FUNC(_cmd, _name, _func, list, _flag, _more) 164 165#define DB_COMMAND(cmd_name, func_name) \ 166 _DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL) 167#define DB_ALIAS(alias_name, func_name) \ --- 18 unchanged lines hidden (view full) --- 186extern db_expr_t db_tab_stop_width; 187extern db_expr_t db_lines_per_page; 188 189struct thread; 190struct vm_map; 191 192void db_check_interrupt(void); 193void db_clear_watchpoints(void); |
194db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt); | 194db_addr_t db_disasm(db_addr_t loc, bool altfmt); |
195 /* instruction disassembler */ 196void db_error(const char *s); 197int db_expression(db_expr_t *valuep); 198int db_get_variable(db_expr_t *valuep); 199void db_iprintf(const char *,...) __printflike(1, 2); 200struct proc *db_lookup_proc(db_expr_t addr); | 195 /* instruction disassembler */ 196void db_error(const char *s); 197int db_expression(db_expr_t *valuep); 198int db_get_variable(db_expr_t *valuep); 199void db_iprintf(const char *,...) __printflike(1, 2); 200struct proc *db_lookup_proc(db_expr_t addr); |
201struct thread *db_lookup_thread(db_expr_t addr, boolean_t check_pid); | 201struct thread *db_lookup_thread(db_expr_t addr, bool check_pid); |
202struct vm_map *db_map_addr(vm_offset_t); | 202struct vm_map *db_map_addr(vm_offset_t); |
203boolean_t db_map_current(struct vm_map *); 204boolean_t db_map_equal(struct vm_map *, struct vm_map *); | 203bool db_map_current(struct vm_map *); 204bool db_map_equal(struct vm_map *, struct vm_map *); |
205int db_md_set_watchpoint(db_expr_t addr, db_expr_t size); 206int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size); 207void db_md_list_watchpoints(void); 208void db_print_loc_and_inst(db_addr_t loc); 209void db_print_thread(void); 210int db_printf(const char *fmt, ...) __printflike(1, 2); 211int db_read_bytes(vm_offset_t addr, size_t size, char *data); 212 /* machine-dependent */ 213int db_readline(char *lstart, int lsize); | 205int db_md_set_watchpoint(db_expr_t addr, db_expr_t size); 206int db_md_clr_watchpoint(db_expr_t addr, db_expr_t size); 207void db_md_list_watchpoints(void); 208void db_print_loc_and_inst(db_addr_t loc); 209void db_print_thread(void); 210int db_printf(const char *fmt, ...) __printflike(1, 2); 211int db_read_bytes(vm_offset_t addr, size_t size, char *data); 212 /* machine-dependent */ 213int db_readline(char *lstart, int lsize); |
214void db_restart_at_pc(boolean_t watchpt); | 214void db_restart_at_pc(bool watchpt); |
215int db_set_variable(db_expr_t value); 216void db_set_watchpoints(void); 217void db_skip_to_eol(void); | 215int db_set_variable(db_expr_t value); 216void db_set_watchpoints(void); 217void db_skip_to_eol(void); |
218boolean_t db_stop_at_pc(boolean_t *is_breakpoint); | 218bool db_stop_at_pc(bool *is_breakpoint); |
219#define db_strcpy strcpy 220void db_trace_self(void); 221int db_trace_thread(struct thread *, int); | 219#define db_strcpy strcpy 220void db_trace_self(void); 221int db_trace_thread(struct thread *, int); |
222int db_value_of_name(const char *name, db_expr_t *valuep); 223int db_value_of_name_pcpu(const char *name, db_expr_t *valuep); 224int db_value_of_name_vnet(const char *name, db_expr_t *valuep); | 222bool db_value_of_name(const char *name, db_expr_t *valuep); 223bool db_value_of_name_pcpu(const char *name, db_expr_t *valuep); 224bool db_value_of_name_vnet(const char *name, db_expr_t *valuep); |
225int db_write_bytes(vm_offset_t addr, size_t size, char *data); 226void db_command_register(struct command_table *, struct command *); 227void db_command_unregister(struct command_table *, struct command *); 228int db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end); 229 230db_cmdfcn_t db_breakpoint_cmd; 231db_cmdfcn_t db_capture_cmd; 232db_cmdfcn_t db_continue_cmd; --- 63 unchanged lines hidden --- | 225int db_write_bytes(vm_offset_t addr, size_t size, char *data); 226void db_command_register(struct command_table *, struct command *); 227void db_command_unregister(struct command_table *, struct command *); 228int db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end); 229 230db_cmdfcn_t db_breakpoint_cmd; 231db_cmdfcn_t db_capture_cmd; 232db_cmdfcn_t db_continue_cmd; --- 63 unchanged lines hidden --- |