]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ddb/db_command.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
23 * @APPLE_LICENSE_HEADER_END@
30 * Revision 1.1.1.1 1998/09/22 21:05:47 wsanchez
31 * Import of Mac OS X kernel (~semeria)
33 * Revision 1.1.1.1 1998/03/07 02:26:09 wsanchez
34 * Import of OSF Mach kernel (~mburg)
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
39 * Move here from db_commands.c the prototype for
40 * db_machine_commands_install(), referenced by PARAGON/model_dep.c.
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]
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]
51 * Revision 1.1.7.1 1994/04/11 09:34:47 bernadat
52 * Added db_command struct decalration.
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]
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]
63 * Revision 1.1 1992/09/30 02:24:14 robert
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().
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().
81 * Revision 2.5 91/07/09 23:15:46 danner
82 * Grabbed up to date copyright.
85 * Revision 2.2 91/04/10 16:02:32 mbj
86 * Grabbed 3.0 copyright/disclaimer since ddb comes from 3.0.
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]
93 * Revision 2.2 90/08/27 21:50:19 dbg
94 * Replace db_last_address_examined with db_prev, db_next.
102 * Mach Operating System
103 * Copyright (c) 1991,1990 Carnegie Mellon University
104 * All Rights Reserved.
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.
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.
116 * Carnegie Mellon requests users of this software to return to
118 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
119 * School of Computer Science
120 * Carnegie Mellon University
121 * Pittsburgh PA 15213-3890
123 * any improvements or extensions that they make and grant Carnegie Mellon
124 * the rights to redistribute these changes.
129 * Author: David B. Golub, Carnegie Mellon University
133 * Command loop declarations.
136 #ifndef _DDB_DB_COMMAND_H_
137 #define _DDB_DB_COMMAND_H_
139 #include <machine/db_machdep.h>
140 #include <db_machine_commands.h>
142 typedef void (*db_func
)(db_expr_t
, int, db_expr_t
, char *);
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
154 #define CS_SET_DOT 0x100 /* set dot after command */
155 struct db_command
*more
; /* another level of command */
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
163 extern db_addr_t db_next
; /* next address to be examined
167 /* Prototypes for functions exported by this module.
170 void db_command_loop(void);
172 void db_machine_commands_install(struct db_command
*ptr
);
174 boolean_t
db_exec_cmd_nest(
178 void db_error(char *s
);
184 #endif /* !_DDB_DB_COMMAND_H_ */