]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ddb/db_watch.h
7f1728a72f445a23df0e5db62fd5ebb868328f37
[apple/xnu.git] / osfmk / ddb / db_watch.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
14 * agreement.
15 *
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
18 * file.
19 *
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
27 *
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
29 */
30 /*
31 * @OSF_COPYRIGHT@
32 */
33 /*
34 * HISTORY
35 *
36 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
37 * Import of Mac OS X kernel (~semeria)
38 *
39 * Revision 1.1.1.1 1998/03/07 02:26:09 wsanchez
40 * Import of OSF Mach kernel (~mburg)
41 *
42 * Revision 1.1.6.1 1994/09/23 01:23:04 ezf
43 * change marker to not FREE
44 * [1994/09/22 21:11:39 ezf]
45 *
46 * Revision 1.1.2.4 1993/07/27 18:28:34 elliston
47 * Add ANSI prototypes. CR #9523.
48 * [1993/07/27 18:13:34 elliston]
49 *
50 * Revision 1.1.2.3 1993/06/07 22:07:00 jeffc
51 * CR9176 - ANSI C violations: trailing tokens on CPP
52 * directives, extra semicolons after decl_ ..., asm keywords
53 * [1993/06/07 18:57:38 jeffc]
54 *
55 * Revision 1.1.2.2 1993/06/02 23:13:21 jeffc
56 * Added to OSF/1 R1.3 from NMK15.0.
57 * [1993/06/02 20:57:59 jeffc]
58 *
59 * Revision 1.1 1992/09/30 02:24:28 robert
60 * Initial revision
61 *
62 * $EndLog$
63 */
64 /* CMU_HIST */
65 /*
66 * Revision 2.5 91/10/09 16:04:47 af
67 * Revision 2.4.3.1 91/10/05 13:09:14 jeffreyh
68 * Changed "map" field of db_watchpoint structure to "task",
69 * and also changed paramters of function declarations.
70 * [91/08/29 tak]
71 *
72 * Revision 2.4.3.1 91/10/05 13:09:14 jeffreyh
73 * Changed "map" field of db_watchpoint structure to "task",
74 * and also changed paramters of function declarations.
75 * [91/08/29 tak]
76 *
77 * Revision 2.4 91/05/14 15:37:46 mrt
78 * Correcting copyright
79 *
80 * Revision 2.3 91/02/05 17:07:31 mrt
81 * Changed to new Mach copyright
82 * [91/01/31 16:20:09 mrt]
83 *
84 * Revision 2.2 90/10/25 14:44:21 rwd
85 * Generalized the watchpoint support.
86 * [90/10/16 rwd]
87 * Created.
88 * [90/10/16 rpd]
89 *
90 */
91 /* CMU_ENDHIST */
92 /*
93 * Mach Operating System
94 * Copyright (c) 1991,1990 Carnegie Mellon University
95 * All Rights Reserved.
96 *
97 * Permission to use, copy, modify and distribute this software and its
98 * documentation is hereby granted, provided that both the copyright
99 * notice and this permission notice appear in all copies of the
100 * software, derivative works or modified versions, and any portions
101 * thereof, and that both notices appear in supporting documentation.
102 *
103 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
104 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
105 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
106 *
107 * Carnegie Mellon requests users of this software to return to
108 *
109 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
110 * School of Computer Science
111 * Carnegie Mellon University
112 * Pittsburgh PA 15213-3890
113 *
114 * any improvements or extensions that they make and grant Carnegie Mellon
115 * the rights to redistribute these changes.
116 */
117 /*
118 */
119 /*
120 * Author: David B. Golub, Carnegie Mellon University
121 * Date: 10/90
122 */
123
124 #ifndef _DDB_DB_WATCH_H_
125 #define _DDB_DB_WATCH_H_
126
127 #include <mach/machine/vm_types.h>
128 #include <kern/task.h>
129 #include <machine/db_machdep.h>
130
131 /*
132 * Watchpoint.
133 */
134
135 typedef struct db_watchpoint {
136 task_t task; /* in this map */
137 db_addr_t loaddr; /* from this address */
138 db_addr_t hiaddr; /* to this address */
139 struct db_watchpoint *link; /* link in in-use or free chain */
140 } *db_watchpoint_t;
141
142
143
144 /* Prototypes for functions exported by this module.
145 */
146
147 void db_deletewatch_cmd(
148 db_expr_t addr,
149 int have_addr,
150 db_expr_t count,
151 char * modif);
152
153 void db_watchpoint_cmd(
154 db_expr_t addr,
155 int have_addr,
156 db_expr_t count,
157 char * modif);
158
159 void db_listwatch_cmd(void);
160
161 void db_clear_watchpoints(void);
162
163 void db_set_watchpoints(void);
164
165 boolean_t db_find_watchpoint(
166 vm_map_t map,
167 db_addr_t addr,
168 db_regs_t *regs);
169
170 #endif /* !_DDB_DB_WATCH_H_ */