Commit | Line | Data |
---|---|---|
4c45483e GW |
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$ | |
31 | */ | |
32 | ||
33 | /* | |
34 | * Necessary declarations for the `ddb' kernel debugger. | |
35 | */ | |
36 | ||
37 | #ifndef __h_ddb_ddb | |
38 | #define __h_ddb_ddb 1 | |
39 | ||
40 | #include "machine/db_machdep.h" /* type definitions */ | |
41 | ||
42 | /* | |
43 | * Global variables... | |
44 | */ | |
45 | extern char *esym; | |
46 | extern unsigned int db_maxoff; | |
47 | extern int db_inst_count; | |
48 | extern int db_load_count; | |
49 | extern int db_store_count; | |
50 | extern int db_radix; | |
51 | extern int db_max_width; | |
52 | extern int db_tab_stop_width; | |
53 | ||
54 | /* | |
55 | * Functions... | |
56 | */ | |
57 | extern void | |
58 | db_read_bytes(vm_offset_t addr, register int size, register char *data); | |
59 | /* machine-dependent */ | |
60 | ||
61 | extern void | |
62 | db_write_bytes(vm_offset_t addr, register int size, register char *data); | |
63 | /* machine-dependent */ | |
64 | ||
65 | struct vm_map; /* forward declaration */ | |
66 | ||
67 | extern boolean_t db_map_equal(struct vm_map *, struct vm_map *); | |
68 | extern boolean_t db_map_current(struct vm_map *); | |
69 | extern struct vm_map *db_map_addr(vm_offset_t); | |
70 | ||
71 | #define db_strcpy strcpy | |
72 | extern int db_expression (db_expr_t *valuep); | |
73 | ||
74 | typedef void db_cmd_fcn(db_expr_t, int, db_expr_t, char *); | |
75 | ||
76 | extern db_cmd_fcn db_listbreak_cmd, db_listwatch_cmd, db_show_regs; | |
77 | extern db_cmd_fcn db_print_cmd, db_examine_cmd, db_set_cmd, db_search_cmd; | |
78 | extern db_cmd_fcn db_write_cmd, db_delete_cmd, db_breakpoint_cmd; | |
79 | extern db_cmd_fcn db_deletewatch_cmd, db_watchpoint_cmd; | |
80 | extern db_cmd_fcn db_single_step_cmd, db_trace_until_call_cmd; | |
81 | extern db_cmd_fcn db_trace_until_matching_cmd, db_continue_cmd; | |
82 | extern db_cmd_fcn db_stack_trace_cmd; | |
83 | ||
84 | extern db_addr_t db_disasm(db_addr_t loc, boolean_t altfmt); | |
85 | /* instruction disassembler */ | |
86 | ||
87 | extern int db_value_of_name (char *name, db_expr_t *valuep); | |
88 | extern int db_get_variable (db_expr_t *valuep); | |
89 | extern void db_putchar (int c); | |
90 | extern void db_error (char *s); | |
91 | extern int db_readline (char *lstart, int lsize); | |
92 | extern void db_printf (const char *fmt, ...); | |
93 | extern void db_check_interrupt(void); | |
94 | extern void db_print_loc_and_inst (db_addr_t loc); | |
95 | ||
96 | extern void db_clear_watchpoints (void); | |
97 | extern void db_set_watchpoints (void); | |
98 | ||
99 | extern void db_restart_at_pc(boolean_t watchpt); | |
100 | extern boolean_t db_stop_at_pc(boolean_t *is_breakpoint); | |
101 | ||
102 | extern void db_skip_to_eol (void); | |
103 | extern void db_single_step (db_regs_t *regs); | |
104 | ||
105 | extern void db_trap (int type, int code); | |
106 | ||
107 | extern void kdbprinttrap(int, int); | |
108 | ||
109 | #endif /* __h_ddb_ddb */ |