/*-1* SPDX-License-Identifier: MIT-CMU2*3* Mach Operating System4* Copyright (c) 1991,1990 Carnegie Mellon University5* All Rights Reserved.6*7* Permission to use, copy, modify and distribute this software and its8* documentation is hereby granted, provided that both the copyright9* notice and this permission notice appear in all copies of the10* software, derivative works or modified versions, and any portions11* thereof, and that both notices appear in supporting documentation.12*13* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS14* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR15* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.16*17* Carnegie Mellon requests users of this software to return to18*19* Software Distribution Coordinator or [email protected]20* School of Computer Science21* Carnegie Mellon University22* Pittsburgh PA 15213-389023*24* any improvements or extensions that they make and grant Carnegie the25* rights to redistribute these changes.26*/2728/*29* Author: David B. Golub, Carnegie Mellon University30* Date: 7/9031*/3233#ifndef _DDB_DB_VARIABLES_H_34#define _DDB_DB_VARIABLES_H_3536/*37* Debugger variables.38*/39struct db_variable;40typedef int db_varfcn_t(struct db_variable *vp, db_expr_t *valuep, int op);41struct db_variable {42char *name; /* Name of variable */43db_expr_t *valuep; /* value of variable */44/* function to call when reading/writing */45db_varfcn_t *fcn;46#define DB_VAR_GET 047#define DB_VAR_SET 148};49#define FCN_NULL ((db_varfcn_t *)0)5051extern struct db_variable db_regs[]; /* machine registers */52extern struct db_variable *db_eregs;5354extern db_varfcn_t db_var_curcpu; /* DPCPU default CPU */55extern db_varfcn_t db_var_curvnet; /* Default vnet */56extern db_varfcn_t db_var_db_cpu; /* DPCPU active CPU */57extern db_varfcn_t db_var_db_vnet; /* Active vnet */5859int db_read_variable(struct db_variable *, db_expr_t *);60int db_write_variable(struct db_variable *, db_expr_t);6162#endif /* _!DDB_DB_VARIABLES_H_ */636465