xref: /netbsd-src/sys/ddb/db_command.h (revision ae1bfcddc410612bc8c58b807e1830becb69a24c)
1 /*
2  * Mach Operating System
3  * Copyright (c) 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
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 the
24  * rights to redistribute these changes.
25  *
26  *	Author: David B. Golub, Carnegie Mellon University
27  *	Date:	7/90
28  *	$Id: db_command.h,v 1.4 1994/03/23 20:00:57 pk Exp $
29  */
30 
31 /*
32  * Command loop declarations.
33  */
34 #include <sys/param.h>
35 #include <sys/proc.h>
36 #include <machine/db_machdep.h>
37 
38 extern void	db_command_loop();
39 extern void	db_skip_to_eol();
40 
41 extern void	db_error(/* char * */);	/* report error */
42 
43 extern db_addr_t	db_dot;		/* current location */
44 extern db_addr_t	db_last_addr;	/* last explicit address typed */
45 extern db_addr_t	db_prev;	/* last address examined
46 					   or written */
47 extern db_addr_t	db_next;	/* next address to be examined
48 					   or written */
49 
50 /*
51  * Command table
52  */
53 struct db_command {
54 	char		*name;		/* command name */
55 	void		(*fcn)();	/* function to call */
56 	int		flag;		/* extra info: */
57 #define	CS_OWN		0x1		/* non-standard syntax */
58 #define	CS_MORE		0x2		/* standard syntax, but may have other
59 					   words at end */
60 #define	CS_SET_DOT	0x100		/* set dot after command */
61 	struct db_command *more;	/* another level of command */
62 };
63