]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/ddb/db_access.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 * Mach Operating System
27 * Copyright (c) 1991,1990 Carnegie Mellon University
28 * All Rights Reserved.
30 * Permission to use, copy, modify and distribute this software and its
31 * documentation is hereby granted, provided that both the copyright
32 * notice and this permission notice appear in all copies of the
33 * software, derivative works or modified versions, and any portions
34 * thereof, and that both notices appear in supporting documentation.
36 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
40 * Carnegie Mellon requests users of this software to return to
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
53 * Author: David B. Golub, Carnegie Mellon University
57 * Data access functions for debugger.
60 #ifndef _DDB_DB_ACCESS_H_
61 #define _DDB_DB_ACCESS_H_
63 #include <mach/boolean.h>
64 #include <machine/db_machdep.h>
65 #include <ddb/db_task_thread.h>
67 /* implementation dependent access capability */
68 #define DB_ACCESS_KERNEL 0 /* only kernel space */
69 #define DB_ACCESS_CURRENT 1 /* kernel or current task space */
70 #define DB_ACCESS_ANY 2 /* any space */
72 #ifndef DB_ACCESS_LEVEL
73 #define DB_ACCESS_LEVEL DB_ACCESS_KERNEL
74 #endif /* DB_ACCESS_LEVEL */
76 #ifndef DB_VALID_KERN_ADDR
77 #define DB_VALID_KERN_ADDR(addr) ((addr) >= VM_MIN_KERNEL_ADDRESS \
78 && (addr) < VM_MAX_KERNEL_ADDRESS)
79 #define DB_VALID_ADDRESS(addr,user) ((user != 0) ^ DB_VALID_KERN_ADDR(addr))
80 #define DB_PHYS_EQ(task1,addr1,task2,addr2) 0
81 #define DB_CHECK_ACCESS(addr,size,task) db_is_current_space(task)
82 #endif /* DB_VALID_KERN_ADDR */
84 extern int db_access_level
;
88 /* Prototypes for functions exported by ddb/db_access.c.
90 db_expr_t
db_get_task_value(
96 void db_put_task_value(
99 register db_expr_t value
,
102 db_expr_t
db_get_value(
105 boolean_t is_signed
);
112 #endif /* !_DDB_DB_ACCESS_H_ */