FreeBSD/Linux Kernel Cross Reference
sys/ddb/db_command.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: db_command.h,v $
29 * Revision 2.8 93/11/17 16:21:09 dbg
30 * Enabled prototypes.
31 * [93/10/06 dbg]
32 *
33 * Revision 2.7 93/01/14 17:24:49 danner
34 * Added db_recover.
35 * [92/10/26 dbg]
36 *
37 * Revision 2.6 91/10/09 15:58:45 af
38 * Added db_exec_conditional_cmd(), and db_option().
39 * Deleted db_skip_to_eol().
40 * [91/08/29 tak]
41 *
42 * Revision 2.5 91/07/09 23:15:46 danner
43 * Grabbed up to date copyright.
44 * [91/07/08 danner]
45 *
46 * Revision 2.2 91/04/10 16:02:32 mbj
47 * Grabbed 3.0 copyright/disclaimer since ddb comes from 3.0.
48 * [91/04/09 rvb]
49 *
50 * Revision 2.3 91/02/05 17:06:15 mrt
51 * Changed to new Mach copyright
52 * [91/01/31 16:17:28 mrt]
53 *
54 * Revision 2.2 90/08/27 21:50:19 dbg
55 * Replace db_last_address_examined with db_prev, db_next.
56 * [90/08/22 dbg]
57 * Created.
58 * [90/08/07 dbg]
59 *
60 */
61 /*
62 * Author: David B. Golub, Carnegie Mellon University
63 * Date: 7/90
64 */
65 /*
66 * Command loop declarations.
67 */
68
69 #include <machine/db_machdep.h>
70 #include <machine/setjmp.h>
71
72 extern void db_command_loop(void);
73 extern boolean_t db_exec_cmd_nest(char *cmd, int size);
74 extern boolean_t db_option(char *modif, int option);
75 extern int db_size_option(char *modif,
76 boolean_t *u_option,
77 boolean_t *t_option);
78
79 extern boolean_t db_expression(db_expr_t *valuep);
80
81 extern
82 #ifdef __GNUC__
83 __volatile__
84 #endif
85 void db_error(char *message); /* report error */
86
87 extern db_addr_t db_dot; /* current location */
88 extern db_addr_t db_last_addr; /* last explicit address typed */
89 extern db_addr_t db_prev; /* last address examined
90 or written */
91 extern db_addr_t db_next; /* next address to be examined
92 or written */
93 extern jmp_buf_t * db_recover; /* error recovery */
94
95 /*
96 * Command table
97 */
98 struct db_command {
99 char * name; /* command name */
100 void (*fcn)( /* function to call */
101 /* db_expr_t addr,
102 boolean_t have_addr,
103 db_expr_t count,
104 char *modif */ );
105 int flag; /* extra info: */
106 #define CS_OWN 0x1 /* non-standard syntax */
107 #define CS_MORE 0x2 /* standard syntax, but may have other
108 words at end */
109 #define CS_SET_DOT 0x100 /* set dot after command */
110 struct db_command *more; /* another level of command */
111 };
Cache object: c78cfd4f30100cf736becd938a6ac697
|