db_variables.h revision 273265
1139747Simp/*- 24Srgrimes * Mach Operating System 34Srgrimes * Copyright (c) 1991,1990 Carnegie Mellon University 44Srgrimes * All Rights Reserved. 58876Srgrimes * 64Srgrimes * Permission to use, copy, modify and distribute this software and its 74Srgrimes * documentation is hereby granted, provided that both the copyright 84Srgrimes * notice and this permission notice appear in all copies of the 94Srgrimes * software, derivative works or modified versions, and any portions 104Srgrimes * thereof, and that both notices appear in supporting documentation. 118876Srgrimes * 128876Srgrimes * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 134Srgrimes * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 144Srgrimes * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 158876Srgrimes * 164Srgrimes * Carnegie Mellon requests users of this software to return to 178876Srgrimes * 184Srgrimes * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 194Srgrimes * School of Computer Science 204Srgrimes * Carnegie Mellon University 214Srgrimes * Pittsburgh PA 15213-3890 228876Srgrimes * 234Srgrimes * any improvements or extensions that they make and grant Carnegie the 244Srgrimes * rights to redistribute these changes. 254Srgrimes * 2650477Speter * $FreeBSD: stable/10/sys/ddb/db_variables.h 273265 2014-10-18 19:22:59Z pfg $ 274Srgrimes */ 28623Srgrimes 294Srgrimes/* 30273265Spfg * Author: David B. Golub, Carnegie Mellon University 314Srgrimes * Date: 7/90 324Srgrimes */ 334Srgrimes 3412472Sbde#ifndef _DDB_DB_VARIABLES_H_ 3512472Sbde#define _DDB_DB_VARIABLES_H_ 364Srgrimes 374Srgrimes/* 384Srgrimes * Debugger variables. 394Srgrimes */ 4012472Sbdestruct db_variable; 4192756Salfredtypedef int db_varfcn_t(struct db_variable *vp, db_expr_t *valuep, int op); 424Srgrimesstruct db_variable { 434Srgrimes char *name; /* Name of variable */ 4437504Sbde db_expr_t *valuep; /* value of variable */ 454Srgrimes /* function to call when reading/writing */ 4612472Sbde db_varfcn_t *fcn; 47264210Spfg#define DB_VAR_GET 0 48264210Spfg#define DB_VAR_SET 1 494Srgrimes}; 5012472Sbde#define FCN_NULL ((db_varfcn_t *)0) 514Srgrimes 524Srgrimesextern struct db_variable db_regs[]; /* machine registers */ 534Srgrimesextern struct db_variable *db_eregs; 544Srgrimes 55195699Srwatsonextern db_varfcn_t db_var_curcpu; /* DPCPU default CPU */ 56195699Srwatsonextern db_varfcn_t db_var_curvnet; /* Default vnet */ 57195699Srwatsonextern db_varfcn_t db_var_db_cpu; /* DPCPU active CPU */ 58195699Srwatsonextern db_varfcn_t db_var_db_vnet; /* Active vnet */ 59195699Srwatson 60131952Smarcelint db_read_variable(struct db_variable *, db_expr_t *); 61131952Smarcelint db_write_variable(struct db_variable *, db_expr_t); 62798Swollman 6312472Sbde#endif /* _!DDB_DB_VARIABLES_H_ */ 64