|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1991,1990 Carnegie Mellon University
4: * All Rights Reserved.
5: *
6: * Permission to use, copy, modify and distribute this software and its
7: * documentation is hereby granted, provided that both the copyright
8: * notice and this permission notice appear in all copies of the
9: * software, derivative works or modified versions, and any portions
10: * thereof, and that both notices appear in supporting documentation.
11: *
12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15: *
16: * Carnegie Mellon requests users of this software to return to
17: *
18: * Software Distribution Coordinator or [email protected]
19: * School of Computer Science
20: * Carnegie Mellon University
21: * Pittsburgh PA 15213-3890
22: *
23: * any improvements or extensions that they make and grant Carnegie Mellon
24: * the rights to redistribute these changes.
25: */
26: /*
27: * Author: David B. Golub, Carnegie Mellon University
28: * Date: 7/90
29: */
30:
31: #ifndef _DB_VARIABLES_H_
32: #define _DB_VARIABLES_H_
33:
34: #include <kern/thread.h>
35:
36: /*
37: * Debugger variables.
38: */
1.1.1.2 ! root 39: struct db_var_aux_param; /* forward */
! 40: typedef struct db_var_aux_param *db_var_aux_param_t; /* forward */
1.1 root 41: struct db_variable {
42: char *name; /* Name of variable */
43: db_expr_t *valuep; /* pointer to value of variable */
44: /* function to call when reading/writing */
1.1.1.2 ! root 45: long (*fcn)(struct db_variable *, db_expr_t *, int, db_var_aux_param_t);
1.1 root 46: short min_level; /* number of minimum suffix levels */
47: short max_level; /* number of maximum suffix levels */
48: short low; /* low value of level 1 suffix */
49: short high; /* high value of level 1 suffix */
50: #define DB_VAR_GET 0
51: #define DB_VAR_SET 1
52: };
1.1.1.2 ! root 53: #define FCN_NULL ((long (*)())0)
1.1 root 54:
55: #define DB_VAR_LEVEL 3 /* maximum number of suffix level */
56:
57: #define db_read_variable(vp, valuep) \
58: db_read_write_variable(vp, valuep, DB_VAR_GET, 0)
59: #define db_write_variable(vp, valuep) \
60: db_read_write_variable(vp, valuep, DB_VAR_SET, 0)
61:
62: /*
63: * auxiliary parameters passed to a variable handler
64: */
65: struct db_var_aux_param {
66: char *modif; /* option strings */
67: short level; /* number of levels */
68: short suffix[DB_VAR_LEVEL]; /* suffix */
69: thread_t thread; /* target task */
70: };
71:
1.1.1.2 ! root 72: /* Already defined above. */
! 73: /* typedef struct db_var_aux_param *db_var_aux_param_t; */
1.1 root 74:
75:
76: extern struct db_variable db_vars[]; /* debugger variables */
77: extern struct db_variable *db_evars;
78: extern struct db_variable db_regs[]; /* machine registers */
79: extern struct db_variable *db_eregs;
80:
1.1.1.2 ! root 81: extern int db_get_variable(db_expr_t *valuep);
! 82:
! 83: void db_set_cmd();
! 84:
1.1 root 85: #endif /* _DB_VARIABLES_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.