]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
25 | /* | |
26 | * HISTORY | |
27 | * Revision 1.1.1.1 1998/09/22 21:05:47 wsanchez | |
28 | * Import of Mac OS X kernel (~semeria) | |
29 | * | |
30 | * Revision 1.1.1.1 1998/03/07 02:26:09 wsanchez | |
31 | * Import of OSF Mach kernel (~mburg) | |
32 | * | |
33 | * Revision 1.1.15.1 1997/03/27 18:46:27 barbou | |
34 | * Add #include <db_machine_commands.h> so that DB_MACHINE_COMMANDS | |
35 | * can be defined. | |
36 | * Move here from db_commands.c the prototype for | |
37 | * db_machine_commands_install(), referenced by PARAGON/model_dep.c. | |
38 | * [97/02/25 barbou] | |
39 | * | |
40 | * Revision 1.1.9.2 1994/09/23 01:18:19 ezf | |
41 | * change marker to not FREE | |
42 | * [1994/09/22 21:09:33 ezf] | |
43 | * | |
44 | * Revision 1.1.9.1 1994/06/11 21:11:39 bolinger | |
45 | * Merge up to NMK17.2. | |
46 | * [1994/06/11 20:03:50 bolinger] | |
47 | * | |
48 | * Revision 1.1.7.1 1994/04/11 09:34:47 bernadat | |
49 | * Added db_command struct decalration. | |
50 | * [94/03/17 bernadat] | |
51 | * | |
52 | * Revision 1.1.2.3 1993/07/27 18:26:57 elliston | |
53 | * Add ANSI prototypes. CR #9523. | |
54 | * [1993/07/27 18:11:08 elliston] | |
55 | * | |
56 | * Revision 1.1.2.2 1993/06/02 23:10:38 jeffc | |
57 | * Added to OSF/1 R1.3 from NMK15.0. | |
58 | * [1993/06/02 20:56:00 jeffc] | |
59 | * | |
60 | * Revision 1.1 1992/09/30 02:24:14 robert | |
61 | * Initial revision | |
62 | * | |
63 | * $EndLog$ | |
64 | */ | |
65 | /* CMU_HIST */ | |
66 | /* | |
67 | * Revision 2.6 91/10/09 15:58:45 af | |
68 | * Revision 2.5.2.1 91/10/05 13:05:30 jeffreyh | |
69 | * Added db_exec_conditional_cmd(), and db_option(). | |
70 | * Deleted db_skip_to_eol(). | |
71 | * [91/08/29 tak] | |
72 | * | |
73 | * Revision 2.5.2.1 91/10/05 13:05:30 jeffreyh | |
74 | * Added db_exec_conditional_cmd(), and db_option(). | |
75 | * Deleted db_skip_to_eol(). | |
76 | * [91/08/29 tak] | |
77 | * | |
78 | * Revision 2.5 91/07/09 23:15:46 danner | |
79 | * Grabbed up to date copyright. | |
80 | * [91/07/08 danner] | |
81 | * | |
82 | * Revision 2.2 91/04/10 16:02:32 mbj | |
83 | * Grabbed 3.0 copyright/disclaimer since ddb comes from 3.0. | |
84 | * [91/04/09 rvb] | |
85 | * | |
86 | * Revision 2.3 91/02/05 17:06:15 mrt | |
87 | * Changed to new Mach copyright | |
88 | * [91/01/31 16:17:28 mrt] | |
89 | * | |
90 | * Revision 2.2 90/08/27 21:50:19 dbg | |
91 | * Replace db_last_address_examined with db_prev, db_next. | |
92 | * [90/08/22 dbg] | |
93 | * Created. | |
94 | * [90/08/07 dbg] | |
95 | * | |
96 | */ | |
97 | /* CMU_ENDHIST */ | |
98 | /* | |
99 | * Mach Operating System | |
100 | * Copyright (c) 1991,1990 Carnegie Mellon University | |
101 | * All Rights Reserved. | |
102 | * | |
103 | * Permission to use, copy, modify and distribute this software and its | |
104 | * documentation is hereby granted, provided that both the copyright | |
105 | * notice and this permission notice appear in all copies of the | |
106 | * software, derivative works or modified versions, and any portions | |
107 | * thereof, and that both notices appear in supporting documentation. | |
108 | * | |
109 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
110 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
111 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
112 | * | |
113 | * Carnegie Mellon requests users of this software to return to | |
114 | * | |
115 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
116 | * School of Computer Science | |
117 | * Carnegie Mellon University | |
118 | * Pittsburgh PA 15213-3890 | |
119 | * | |
120 | * any improvements or extensions that they make and grant Carnegie Mellon | |
121 | * the rights to redistribute these changes. | |
122 | */ | |
123 | /* | |
124 | */ | |
125 | /* | |
126 | * Author: David B. Golub, Carnegie Mellon University | |
127 | * Date: 7/90 | |
128 | */ | |
129 | /* | |
130 | * Command loop declarations. | |
131 | */ | |
132 | ||
133 | #ifndef _DDB_DB_COMMAND_H_ | |
134 | #define _DDB_DB_COMMAND_H_ | |
135 | ||
136 | #include <machine/db_machdep.h> | |
137 | #include <db_machine_commands.h> | |
138 | ||
139 | typedef void (*db_func)(db_expr_t, int, db_expr_t, char *); | |
140 | ||
141 | /* | |
142 | * Command table | |
143 | */ | |
144 | struct db_command { | |
145 | char * name; /* command name */ | |
146 | db_func fcn; /* function to call */ | |
147 | int flag; /* extra info: */ | |
148 | #define CS_OWN 0x1 /* non-standard syntax */ | |
149 | #define CS_MORE 0x2 /* standard syntax, but may have other | |
150 | words at end */ | |
151 | #define CS_SET_DOT 0x100 /* set dot after command */ | |
152 | struct db_command *more; /* another level of command */ | |
153 | }; | |
154 | ||
155 | ||
156 | extern db_addr_t db_dot; /* current location */ | |
157 | extern db_addr_t db_last_addr; /* last explicit address typed */ | |
158 | extern db_addr_t db_prev; /* last address examined | |
159 | or written */ | |
160 | extern db_addr_t db_next; /* next address to be examined | |
161 | or written */ | |
162 | ||
163 | ||
164 | /* Prototypes for functions exported by this module. | |
165 | */ | |
166 | ||
167 | void db_command_loop(void); | |
168 | ||
169 | void db_machine_commands_install(struct db_command *ptr); | |
170 | ||
171 | boolean_t db_exec_cmd_nest( | |
172 | char *cmd, | |
173 | int size); | |
174 | ||
175 | void db_error(char *s); | |
176 | ||
177 | boolean_t db_option( | |
178 | char *modif, | |
179 | int option); | |
180 | ||
181 | #endif /* !_DDB_DB_COMMAND_H_ */ |