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