db_variables.h revision 92756
1182852Simp/*
2155437Simp * Mach Operating System
3155324Simp * Copyright (c) 1991,1990 Carnegie Mellon University
4155324Simp * All Rights Reserved.
5155324Simp *
6155324Simp * Permission to use, copy, modify and distribute this software and its
7155324Simp * documentation is hereby granted, provided that both the copyright
8155324Simp * notice and this permission notice appear in all copies of the
9155324Simp * software, derivative works or modified versions, and any portions
10155324Simp * thereof, and that both notices appear in supporting documentation.
11155324Simp *
12155324Simp * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
13155324Simp * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14155324Simp * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15155324Simp *
16155324Simp * Carnegie Mellon requests users of this software to return to
17155324Simp *
18155324Simp *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
19155324Simp *  School of Computer Science
20155324Simp *  Carnegie Mellon University
21155324Simp *  Pittsburgh PA 15213-3890
22155324Simp *
23155324Simp * any improvements or extensions that they make and grant Carnegie the
24182852Simp * rights to redistribute these changes.
25182852Simp *
26167858Simp * $FreeBSD: head/sys/ddb/db_variables.h 92756 2002-03-20 05:14:42Z alfred $
27185478Ssam */
28155324Simp
29155324Simp/*
30182852Simp * 	Author: David B. Golub, Carnegie Mellon University
31182852Simp *	Date:	7/90
32155324Simp */
33155324Simp
34155324Simp#ifndef _DDB_DB_VARIABLES_H_
35155324Simp#define	_DDB_DB_VARIABLES_H_
36155324Simp
37155324Simp/*
38155324Simp * Debugger variables.
39155324Simp */
40160348Simpstruct db_variable;
41182852Simptypedef	int	db_varfcn_t(struct db_variable *vp, db_expr_t *valuep, int op);
42167858Simpstruct db_variable {
43160348Simp	char	*name;		/* Name of variable */
44155324Simp	db_expr_t *valuep;	/* value of variable */
45177662Sdfr				/* function to call when reading/writing */
46167858Simp	db_varfcn_t *fcn;
47182852Simp#define DB_VAR_GET	0
48182852Simp#define DB_VAR_SET	1
49160348Simp};
50155324Simp#define	FCN_NULL	((db_varfcn_t *)0)
51155324Simp
52155324Simpextern struct db_variable	db_regs[];	/* machine registers */
53155324Simpextern struct db_variable	*db_eregs;
54155324Simp
55155324Simpvoid	db_read_variable(struct db_variable *, db_expr_t *);
56155324Simp
57155324Simp#endif /* _!DDB_DB_VARIABLES_H_ */
58155324Simp