]>
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 * 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.
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
20 * @APPLE_LICENSE_HEADER_END@
27 * Revision 1.1.1.1 1998/09/22 21:05:47 wsanchez
28 * Import of Mac OS X kernel (~semeria)
30 * Revision 1.1.1.1 1998/03/07 02:26:09 wsanchez
31 * Import of OSF Mach kernel (~mburg)
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
36 * Move here from db_commands.c the prototype for
37 * db_machine_commands_install(), referenced by PARAGON/model_dep.c.
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]
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]
48 * Revision 1.1.7.1 1994/04/11 09:34:47 bernadat
49 * Added db_command struct decalration.
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]
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]
60 * Revision 1.1 1992/09/30 02:24:14 robert
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().
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().
78 * Revision 2.5 91/07/09 23:15:46 danner
79 * Grabbed up to date copyright.
82 * Revision 2.2 91/04/10 16:02:32 mbj
83 * Grabbed 3.0 copyright/disclaimer since ddb comes from 3.0.
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]
90 * Revision 2.2 90/08/27 21:50:19 dbg
91 * Replace db_last_address_examined with db_prev, db_next.
99 * Mach Operating System
100 * Copyright (c) 1991,1990 Carnegie Mellon University
101 * All Rights Reserved.
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.
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.
113 * Carnegie Mellon requests users of this software to return to
115 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
116 * School of Computer Science
117 * Carnegie Mellon University
118 * Pittsburgh PA 15213-3890
120 * any improvements or extensions that they make and grant Carnegie Mellon
121 * the rights to redistribute these changes.
126 * Author: David B. Golub, Carnegie Mellon University
130 * Command loop declarations.
133 #ifndef _DDB_DB_COMMAND_H_
134 #define _DDB_DB_COMMAND_H_
136 #include <machine/db_machdep.h>
137 #include <db_machine_commands.h>
139 typedef void (*db_func
)(db_expr_t
, int, db_expr_t
, char *);
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
151 #define CS_SET_DOT 0x100 /* set dot after command */
152 struct db_command
*more
; /* another level of command */
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
160 extern db_addr_t db_next
; /* next address to be examined
164 /* Prototypes for functions exported by this module.
167 void db_command_loop(void);
169 void db_machine_commands_install(struct db_command
*ptr
);
171 boolean_t
db_exec_cmd_nest(
175 void db_error(char *s
);
181 #endif /* !_DDB_DB_COMMAND_H_ */