1*86d7f5d3SJohn Marino /* 2*86d7f5d3SJohn Marino * Mach Operating System 3*86d7f5d3SJohn Marino * Copyright (c) 1991,1990 Carnegie Mellon University 4*86d7f5d3SJohn Marino * All Rights Reserved. 5*86d7f5d3SJohn Marino * 6*86d7f5d3SJohn Marino * Permission to use, copy, modify and distribute this software and its 7*86d7f5d3SJohn Marino * documentation is hereby granted, provided that both the copyright 8*86d7f5d3SJohn Marino * notice and this permission notice appear in all copies of the 9*86d7f5d3SJohn Marino * software, derivative works or modified versions, and any portions 10*86d7f5d3SJohn Marino * thereof, and that both notices appear in supporting documentation. 11*86d7f5d3SJohn Marino * 12*86d7f5d3SJohn Marino * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 13*86d7f5d3SJohn Marino * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 14*86d7f5d3SJohn Marino * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 15*86d7f5d3SJohn Marino * 16*86d7f5d3SJohn Marino * Carnegie Mellon requests users of this software to return to 17*86d7f5d3SJohn Marino * 18*86d7f5d3SJohn Marino * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 19*86d7f5d3SJohn Marino * School of Computer Science 20*86d7f5d3SJohn Marino * Carnegie Mellon University 21*86d7f5d3SJohn Marino * Pittsburgh PA 15213-3890 22*86d7f5d3SJohn Marino * 23*86d7f5d3SJohn Marino * any improvements or extensions that they make and grant Carnegie the 24*86d7f5d3SJohn Marino * rights to redistribute these changes. 25*86d7f5d3SJohn Marino * 26*86d7f5d3SJohn Marino * $FreeBSD: src/sys/ddb/db_variables.h,v 1.11 1999/08/28 00:41:11 peter Exp $ 27*86d7f5d3SJohn Marino * $DragonFly: src/sys/ddb/db_variables.h,v 1.4 2006/05/20 02:42:01 dillon Exp $ 28*86d7f5d3SJohn Marino */ 29*86d7f5d3SJohn Marino 30*86d7f5d3SJohn Marino /* 31*86d7f5d3SJohn Marino * Author: David B. Golub, Carnegie Mellon University 32*86d7f5d3SJohn Marino * Date: 7/90 33*86d7f5d3SJohn Marino */ 34*86d7f5d3SJohn Marino 35*86d7f5d3SJohn Marino #ifndef _DDB_DB_VARIABLES_H_ 36*86d7f5d3SJohn Marino #define _DDB_DB_VARIABLES_H_ 37*86d7f5d3SJohn Marino 38*86d7f5d3SJohn Marino #ifndef _DDB_DDB_H_ 39*86d7f5d3SJohn Marino #include <ddb/ddb.h> 40*86d7f5d3SJohn Marino #endif 41*86d7f5d3SJohn Marino 42*86d7f5d3SJohn Marino /* 43*86d7f5d3SJohn Marino * Debugger variables. 44*86d7f5d3SJohn Marino */ 45*86d7f5d3SJohn Marino struct db_variable; 46*86d7f5d3SJohn Marino 47*86d7f5d3SJohn Marino typedef int db_varfcn_t (struct db_variable *vp, db_expr_t *valuep, int op); 48*86d7f5d3SJohn Marino 49*86d7f5d3SJohn Marino struct db_variable { 50*86d7f5d3SJohn Marino char *name; /* Name of variable */ 51*86d7f5d3SJohn Marino db_expr_t *valuep; /* value of variable */ 52*86d7f5d3SJohn Marino /* function to call when reading/writing */ 53*86d7f5d3SJohn Marino db_varfcn_t *fcn; 54*86d7f5d3SJohn Marino }; 55*86d7f5d3SJohn Marino 56*86d7f5d3SJohn Marino #define DB_VAR_GET 0 57*86d7f5d3SJohn Marino #define DB_VAR_SET 1 58*86d7f5d3SJohn Marino 59*86d7f5d3SJohn Marino #ifdef _KERNEL 60*86d7f5d3SJohn Marino 61*86d7f5d3SJohn Marino extern struct db_variable db_regs[]; /* machine registers */ 62*86d7f5d3SJohn Marino extern struct db_variable *db_eregs; 63*86d7f5d3SJohn Marino 64*86d7f5d3SJohn Marino void db_read_variable (struct db_variable *, db_expr_t *); 65*86d7f5d3SJohn Marino 66*86d7f5d3SJohn Marino #endif 67*86d7f5d3SJohn Marino 68*86d7f5d3SJohn Marino #endif /* _!DDB_DB_VARIABLES_H_ */ 69