xref: /freebsd/sys/ddb/db_variables.h (revision 5b81b6b301437eb9a6df491c829475bd29ae5d6c)
15b81b6b3SRodney W. Grimes /*
25b81b6b3SRodney W. Grimes  * Mach Operating System
35b81b6b3SRodney W. Grimes  * Copyright (c) 1991,1990 Carnegie Mellon University
45b81b6b3SRodney W. Grimes  * All Rights Reserved.
55b81b6b3SRodney W. Grimes  *
65b81b6b3SRodney W. Grimes  * Permission to use, copy, modify and distribute this software and its
75b81b6b3SRodney W. Grimes  * documentation is hereby granted, provided that both the copyright
85b81b6b3SRodney W. Grimes  * notice and this permission notice appear in all copies of the
95b81b6b3SRodney W. Grimes  * software, derivative works or modified versions, and any portions
105b81b6b3SRodney W. Grimes  * thereof, and that both notices appear in supporting documentation.
115b81b6b3SRodney W. Grimes  *
125b81b6b3SRodney W. Grimes  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
135b81b6b3SRodney W. Grimes  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
145b81b6b3SRodney W. Grimes  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
155b81b6b3SRodney W. Grimes  *
165b81b6b3SRodney W. Grimes  * Carnegie Mellon requests users of this software to return to
175b81b6b3SRodney W. Grimes  *
185b81b6b3SRodney W. Grimes  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
195b81b6b3SRodney W. Grimes  *  School of Computer Science
205b81b6b3SRodney W. Grimes  *  Carnegie Mellon University
215b81b6b3SRodney W. Grimes  *  Pittsburgh PA 15213-3890
225b81b6b3SRodney W. Grimes  *
235b81b6b3SRodney W. Grimes  * any improvements or extensions that they make and grant Carnegie the
245b81b6b3SRodney W. Grimes  * rights to redistribute these changes.
255b81b6b3SRodney W. Grimes  */
265b81b6b3SRodney W. Grimes /*
275b81b6b3SRodney W. Grimes  * HISTORY
285b81b6b3SRodney W. Grimes  * $Log: db_variables.h,v $
295b81b6b3SRodney W. Grimes  * Revision 1.1  1992/03/25  21:45:35  pace
305b81b6b3SRodney W. Grimes  * Initial revision
315b81b6b3SRodney W. Grimes  *
325b81b6b3SRodney W. Grimes  * Revision 2.3  91/02/05  17:07:23  mrt
335b81b6b3SRodney W. Grimes  * 	Changed to new Mach copyright
345b81b6b3SRodney W. Grimes  * 	[91/01/31  16:19:54  mrt]
355b81b6b3SRodney W. Grimes  *
365b81b6b3SRodney W. Grimes  * Revision 2.2  90/08/27  21:53:40  dbg
375b81b6b3SRodney W. Grimes  * 	Modularized typedef name.  Documented the calling sequence of
385b81b6b3SRodney W. Grimes  * 	the (optional) access function of a variable.  Now the valuep
395b81b6b3SRodney W. Grimes  * 	field can be made opaque, eg be an offset that fcn() resolves.
405b81b6b3SRodney W. Grimes  * 	[90/08/20            af]
415b81b6b3SRodney W. Grimes  *
425b81b6b3SRodney W. Grimes  * 	Created.
435b81b6b3SRodney W. Grimes  * 	[90/07/25            dbg]
445b81b6b3SRodney W. Grimes  *
455b81b6b3SRodney W. Grimes  */
465b81b6b3SRodney W. Grimes /*
475b81b6b3SRodney W. Grimes  * 	Author: David B. Golub, Carnegie Mellon University
485b81b6b3SRodney W. Grimes  *	Date:	7/90
495b81b6b3SRodney W. Grimes  */
505b81b6b3SRodney W. Grimes 
515b81b6b3SRodney W. Grimes #ifndef	_DB_VARIABLES_H_
525b81b6b3SRodney W. Grimes #define	_DB_VARIABLES_H_
535b81b6b3SRodney W. Grimes 
545b81b6b3SRodney W. Grimes /*
555b81b6b3SRodney W. Grimes  * Debugger variables.
565b81b6b3SRodney W. Grimes  */
575b81b6b3SRodney W. Grimes struct db_variable {
585b81b6b3SRodney W. Grimes 	char	*name;		/* Name of variable */
595b81b6b3SRodney W. Grimes 	int	*valuep;	/* value of variable */
605b81b6b3SRodney W. Grimes 				/* function to call when reading/writing */
615b81b6b3SRodney W. Grimes 	int	(*fcn)(/* db_variable *vp, db_expr_t *valuep, int op */);
625b81b6b3SRodney W. Grimes #define DB_VAR_GET	0
635b81b6b3SRodney W. Grimes #define DB_VAR_SET	1
645b81b6b3SRodney W. Grimes };
655b81b6b3SRodney W. Grimes #define	FCN_NULL	((int (*)())0)
665b81b6b3SRodney W. Grimes 
675b81b6b3SRodney W. Grimes extern struct db_variable	db_vars[];	/* debugger variables */
685b81b6b3SRodney W. Grimes extern struct db_variable	*db_evars;
695b81b6b3SRodney W. Grimes extern struct db_variable	db_regs[];	/* machine registers */
705b81b6b3SRodney W. Grimes extern struct db_variable	*db_eregs;
715b81b6b3SRodney W. Grimes 
725b81b6b3SRodney W. Grimes #endif	/* _DB_VARIABLES_H_ */
73