FreeBSD/Linux Kernel Cross Reference
sys/ddb/db_access.h
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 Software.Distribution@CS.CMU.EDU
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 * HISTORY
28 * $Log: db_access.h,v $
29 * Revision 2.6 93/01/14 17:24:19 danner
30 * Enabled prototypes.
31 * [92/11/30 af]
32 *
33 * Revision 2.5 91/10/09 15:57:01 af
34 * Added declarations of db_{get,put}_task_value.
35 * Added definitions of implementation dependent access capability.
36 * Added default defines of space access check functions.
37 * [91/08/29 tak]
38 *
39 * Revision 2.4 91/05/14 15:31:48 mrt
40 * Correcting copyright
41 *
42 * Revision 2.3 91/02/05 17:05:49 mrt
43 * Changed to new Mach copyright
44 * [91/01/31 16:16:37 mrt]
45 *
46 * Revision 2.2 90/08/27 21:48:27 dbg
47 * Created.
48 * [90/08/07 dbg]
49 *
50 */
51 /*
52 * Author: David B. Golub, Carnegie Mellon University
53 * Date: 7/90
54 */
55 /*
56 * Data access functions for debugger.
57 */
58 #include <mach/boolean.h>
59 #include <machine/db_machdep.h>
60 #include <ddb/db_task_thread.h>
61
62 /* implementation dependent access capability */
63 #define DB_ACCESS_KERNEL 0 /* only kernel space */
64 #define DB_ACCESS_CURRENT 1 /* kernel or current task space */
65 #define DB_ACCESS_ANY 2 /* any space */
66
67 #ifndef DB_ACCESS_LEVEL
68 #define DB_ACCESS_LEVEL DB_ACCESS_KERNEL
69 #endif DB_ACCESS_LEVEL
70
71 #ifndef DB_VALID_KERN_ADDR
72 #define DB_VALID_KERN_ADDR(addr) ((addr) >= VM_MIN_KERNEL_ADDRESS \
73 && (addr) < VM_MAX_KERNEL_ADDRESS)
74 #define DB_VALID_ADDRESS(addr,user) ((user != 0) ^ DB_VALID_KERN_ADDR(addr))
75 #define DB_PHYS_EQ(task1,addr1,task2,addr2) 0
76 #define DB_CHECK_ACCESS(addr,size,task) db_is_current_task(task)
77 #endif DB_VALID_KERN_ADDR
78
79 extern int db_access_level;
80
81 extern db_expr_t db_get_value( db_addr_t addr,
82 int size,
83 boolean_t is_signed );
84
85 extern void db_put_value( db_addr_t addr,
86 int size,
87 db_expr_t value );
88
89 extern db_expr_t db_get_task_value( db_addr_t addr,
90 int size,
91 boolean_t is_signed,
92 task_t task );
93
94 extern void db_put_task_value( db_addr_t addr,
95 int size,
96 db_expr_t value,
97 task_t task );
Cache object: 6f920cc404a2fa467d13cb622cfb0d05
|