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: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. Neither the name of the University nor the names of its contributors 15 * may be used to endorse or promote products derived from this software 16 * without specific prior written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 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: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. Neither the name of the University nor the names of its contributors 15 * may be used to endorse or promote products derived from this software 16 * without specific prior written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 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 * $Id: ddb.h,v 1.5 1995/03/16 18:11:01 bde Exp $
| 30 * $Id: ddb.h,v 1.6 1995/05/30 07:57:24 rgrimes Exp $
|
31 */ 32 33/* 34 * Necessary declarations for the `ddb' kernel debugger. 35 */ 36
| 31 */ 32 33/* 34 * Necessary declarations for the `ddb' kernel debugger. 35 */ 36
|
37#ifndef __h_ddb_ddb 38#define __h_ddb_ddb 1
| 37#ifndef _DDB_DDB_H_ 38#define _DDB_DDB_H_
|
39 40#include <machine/db_machdep.h> /* type definitions */ 41#include <vm/vm.h> 42
| 39 40#include <machine/db_machdep.h> /* type definitions */ 41#include <vm/vm.h> 42
|
| 43typedef void db_cmdfcn_t __P((db_expr_t addr, boolean_t have_addr, 44 db_expr_t count, char *modif)); 45
|
43/* 44 * Global variables... 45 */ 46extern char *esym; 47extern unsigned int db_maxoff; 48extern int db_inst_count; 49extern int db_load_count; 50extern int db_store_count; 51extern int db_radix; 52extern int db_max_width; 53extern int db_tab_stop_width; 54
| 46/* 47 * Global variables... 48 */ 49extern char *esym; 50extern unsigned int db_maxoff; 51extern int db_inst_count; 52extern int db_load_count; 53extern int db_store_count; 54extern int db_radix; 55extern int db_max_width; 56extern int db_tab_stop_width; 57
|
| 58struct vm_map; /* forward declaration */ 59
|
55/* 56 * Functions... 57 */
| 60/* 61 * Functions... 62 */
|
58extern void 59db_read_bytes(vm_offset_t addr, register int size, register char *data); 60 /* machine-dependent */
| |
61
| 63
|
62extern void 63db_write_bytes(vm_offset_t addr, register int size, register char *data);
| 64void cnpollc __P((int)); 65void db_check_interrupt __P((void)); 66void db_clear_watchpoints __P((void)); 67db_addr_t db_disasm __P((db_addr_t loc, boolean_t altfmt)); 68 /* instruction disassembler */ 69void db_error __P((char *s)); 70int db_expression __P((db_expr_t *valuep)); 71int db_get_variable __P((db_expr_t *valuep)); 72struct vm_map *db_map_addr __P((vm_offset_t)); 73boolean_t db_map_current __P((struct vm_map *)); 74boolean_t db_map_equal __P((struct vm_map *, struct vm_map *)); 75void db_print_loc_and_inst __P((db_addr_t loc)); 76void db_printf __P((const char *fmt, ...)); 77void db_putchar __P((int c)); 78void db_read_bytes __P((vm_offset_t addr, int size, char *data));
|
64 /* machine-dependent */
| 79 /* machine-dependent */
|
| 80int db_readline __P((char *lstart, int lsize)); 81void db_restart_at_pc __P((boolean_t watchpt)); 82void db_set_watchpoints __P((void)); 83void db_single_step __P((db_regs_t *regs)); 84void db_skip_to_eol __P((void)); 85boolean_t db_stop_at_pc __P((boolean_t *is_breakpoint)); 86#define db_strcpy strcpy 87void db_trap __P((int type, int code)); 88int db_value_of_name __P((char *name, db_expr_t *valuep)); 89void db_write_bytes __P((vm_offset_t addr, int size, char *data)); 90 /* machine-dependent */ 91void kdb_init __P((void)); 92void kdbprintf __P((const char *fmt, ...)); 93void kdbprinttrap __P((int, int));
|
65
| 94
|
66struct vm_map; /* forward declaration */
| 95db_cmdfcn_t db_breakpoint_cmd; 96db_cmdfcn_t db_continue_cmd; 97db_cmdfcn_t db_delete_cmd; 98db_cmdfcn_t db_deletewatch_cmd; 99db_cmdfcn_t db_examine_cmd; 100db_cmdfcn_t db_fncall; 101db_cmdfcn_t db_listbreak_cmd; 102db_cmdfcn_t db_listwatch_cmd; 103db_cmdfcn_t db_panic; 104db_cmdfcn_t db_print_cmd; 105db_cmdfcn_t db_ps; 106db_cmdfcn_t db_search_cmd; 107db_cmdfcn_t db_set_cmd; 108db_cmdfcn_t db_show_regs; 109db_cmdfcn_t db_single_step_cmd; 110db_cmdfcn_t db_stack_trace_cmd; 111db_cmdfcn_t db_trace_until_call_cmd; 112db_cmdfcn_t db_trace_until_matching_cmd; 113db_cmdfcn_t db_watchpoint_cmd; 114db_cmdfcn_t db_write_cmd;
|
67
| 115
|
68extern boolean_t db_map_equal(struct vm_map *, struct vm_map *); 69extern boolean_t db_map_current(struct vm_map *); 70extern struct vm_map *db_map_addr(vm_offset_t);
| 116#if 0 117db_cmdfcn_t db_help_cmd; 118db_cmdfcn_t db_show_all_threads; 119db_cmdfcn_t db_show_one_thread; 120db_cmdfcn_t ipc_port_print; 121db_cmdfcn_t vm_page_print; 122#endif
|
71
| 123
|
72#define db_strcpy strcpy 73extern int db_expression (db_expr_t *valuep); 74 75typedef void db_cmd_fcn(db_expr_t, int, db_expr_t, char *); 76 77extern db_cmd_fcn db_listbreak_cmd, db_listwatch_cmd, db_show_regs; 78extern db_cmd_fcn db_print_cmd, db_examine_cmd, db_set_cmd, db_search_cmd; 79extern db_cmd_fcn db_write_cmd, db_delete_cmd, db_breakpoint_cmd; 80extern db_cmd_fcn db_deletewatch_cmd, db_watchpoint_cmd; 81extern db_cmd_fcn db_single_step_cmd, db_trace_until_call_cmd; 82extern db_cmd_fcn db_trace_until_matching_cmd, db_continue_cmd; 83extern db_cmd_fcn db_stack_trace_cmd; 84 85extern db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt); 86 /* instruction disassembler */ 87 88extern int db_value_of_name (char *name, db_expr_t *valuep); 89extern int db_get_variable (db_expr_t *valuep); 90extern void db_putchar (int c); 91extern void db_error (char *s); 92extern int db_readline (char *lstart, int lsize); 93extern void db_printf (const char *fmt, ...); 94extern void db_check_interrupt(void); 95extern void db_print_loc_and_inst (db_addr_t loc); 96 97extern void db_clear_watchpoints (void); 98extern void db_set_watchpoints (void); 99 100extern void db_restart_at_pc(boolean_t watchpt); 101extern boolean_t db_stop_at_pc(boolean_t *is_breakpoint); 102 103extern void db_skip_to_eol (void); 104extern void db_single_step (db_regs_t *regs); 105 106extern void db_trap (int type, int code); 107 108extern void cnpollc(int); 109 110extern void kdb_init(void); 111extern void kdbprinttrap(int, int); 112 113#endif /* __h_ddb_ddb */
| 124#endif /* !_DDB_DDB_H_ */
|
| |