1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989,1988 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: mach_debug.defs,v $
29 * Revision 2.9 92/01/14 16:45:41 rpd
30 * Added CountInOut, Dealloc to all variable-sized Out array arguments.
31 * [92/01/08 rpd]
32 * Replaced the old mach_vm_region_info with new mach_vm_region_info,
33 * mach_vm_object_info, mach_vm_object_pages calls.
34 * Removed vm_mapped_pages_info.
35 * [91/12/30 rpd]
36 * Added mach_port_kernel_object.
37 * [91/12/14 rpd]
38 *
39 * Revision 2.8 91/07/31 17:55:25 dbg
40 * Added host_load_symbol_table.
41 * [91/07/30 17:11:15 dbg]
42 *
43 * Revision 2.7 91/05/14 17:03:35 mrt
44 * Correcting copyright
45 *
46 * Revision 2.6 91/02/05 17:37:54 mrt
47 * Changed to new Mach copyright
48 * [91/02/01 17:28:41 mrt]
49 *
50 * Revision 2.5 91/01/08 15:19:11 rpd
51 * Added host_virtual_physical_table_info.
52 * [91/01/02 rpd]
53 *
54 * Revision 2.4 90/10/25 14:45:57 rwd
55 * Added processor_set_stack_usage.
56 * [90/10/22 rpd]
57 *
58 * Revision 2.3 90/06/02 15:00:33 rpd
59 * Added mach_vm_region_info.
60 * [90/04/20 rpd]
61 * Converted to new IPC.
62 * [90/03/26 22:43:02 rpd]
63 *
64 * Revision 2.2 90/05/03 15:48:45 dbg
65 * Remove callout_statistics. Add vm_mapped_pages_info.
66 * [90/04/06 dbg]
67 *
68 * Revision 2.1 89/08/03 17:19:04 rwd
69 * Created.
70 *
71 * Revision 2.4 89/02/25 18:43:35 gm0w
72 * Changes for cleanup.
73 *
74 * Revision 2.3 89/01/15 16:32:28 rpd
75 * Updated includes for the new mach/ directory.
76 * [89/01/15 15:11:01 rpd]
77 *
78 * Revision 2.2 89/01/12 08:00:17 rpd
79 * Created.
80 * [89/01/12 04:20:38 rpd]
81 *
82 */
83 /*
84 * Matchmaker definitions file for Mach kernel debugging interface.
85 */
86
87 #ifdef KERNEL
88 #include <mach_ipc_debug.h>
89 #include <mach_vm_debug.h>
90 #include <mach_kdb.h>
91 #endif KERNEL
92
93 subsystem
94 #if KERNEL_SERVER
95 KernelServer
96 #endif KERNEL_SERVER
97 mach_debug 3000;
98
99 #include <mach/std_types.defs>
100 #include <mach/mach_types.defs>
101 #include <mach_debug/mach_debug_types.defs>
102
103 skip; /* host_ipc_statistics */
104 skip; /* host_ipc_statistics_reset */
105 skip; /* host_callout_info */
106 skip; /* host_callout_statistics */
107 skip; /* host_callout_statistics_reset */
108
109 /*
110 * Returns information about the memory allocation zones.
111 */
112 routine host_zone_info(
113 host : host_t;
114 out names : zone_name_array_t,
115 CountInOut, Dealloc;
116 out info : zone_info_array_t,
117 CountInOut, Dealloc);
118
119 skip; /* host_ipc_bucket_info */
120
121 #if !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
122
123 /*
124 * Returns the exact number of extant send rights
125 * for the given receive right.
126 */
127
128 routine mach_port_get_srights(
129 task : ipc_space_t;
130 name : mach_port_name_t;
131 out srights : mach_port_rights_t);
132
133 /*
134 * Returns information about the global reverse hash table.
135 */
136
137 routine host_ipc_hash_info(
138 host : host_t;
139 out info : hash_info_bucket_array_t,
140 CountInOut, Dealloc);
141
142 /*
143 * Returns information about the marequest hash table.
144 */
145
146 routine host_ipc_marequest_info(
147 host : host_t;
148 out max_requests : unsigned;
149 out info : hash_info_bucket_array_t,
150 CountInOut, Dealloc);
151
152 /*
153 * Returns information about an IPC space.
154 */
155
156 routine mach_port_space_info(
157 task : ipc_space_t;
158 out info : ipc_info_space_t;
159 out table_info : ipc_info_name_array_t,
160 CountInOut, Dealloc;
161 out tree_info : ipc_info_tree_name_array_t,
162 CountInOut, Dealloc);
163
164 /*
165 * Returns information about the dead-name requests
166 * registered with the named receive right.
167 */
168
169 routine mach_port_dnrequest_info(
170 task : ipc_space_t;
171 name : mach_port_name_t;
172 out total : unsigned; /* total size of table */
173 out used : unsigned); /* amount used */
174
175 #else !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
176 skip; /* mach_port_get_srights */
177 skip; /* host_ipc_hash_info */
178 skip; /* host_ipc_marequest_info */
179 skip; /* mach_port_space_info */
180 skip; /* mach_port_dnrequest_info */
181 #endif !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
182
183 skip; /* mach_vm_region_info */
184 skip; /* vm_mapped_pages_info */
185
186 /*
187 * Returns stack usage information:
188 * reserved Amount of stack space reserved for pcb.
189 * total Number of stacks.
190 * space Total VM space for stacks.
191 * resident Resident VM space for stacks.
192 * maxusage Maximum amount of stack used.
193 * maxstack Address in the kernel of the largest stack.
194 */
195
196 routine host_stack_usage(
197 host : host_t;
198 out reserved : vm_size_t;
199 out total : unsigned;
200 out space : vm_size_t;
201 out resident : vm_size_t;
202 out maxusage : vm_size_t;
203 out maxstack : vm_offset_t);
204
205 routine processor_set_stack_usage(
206 pset : processor_set_name_t;
207 out total : unsigned;
208 out space : vm_size_t;
209 out resident : vm_size_t;
210 out maxusage : vm_size_t;
211 out maxstack : vm_offset_t);
212
213 #if !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
214
215 /*
216 * Returns information about the global VP table.
217 */
218
219 routine host_virtual_physical_table_info(
220 host : host_t;
221 out info : hash_info_bucket_array_t,
222 CountInOut, Dealloc);
223
224 #else !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
225 skip; /* host_virtual_physical_table_info */
226 #endif !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
227
228 #if !defined(MACH_KDB) || MACH_KDB
229 /*
230 * Loads a symbol table for an external file into the kernel debugger.
231 * The symbol table data is an array of characters. It is assumed that
232 * the caller and the kernel debugger agree on its format.
233 */
234
235 routine host_load_symbol_table(
236 host : host_priv_t;
237 task : task_t;
238 name : symtab_name_t;
239 symtab : pointer_t);
240
241 #else !defined(MACH_KDB) || MACH_KDB
242 skip; /* host_load_symbol_table */
243 #endif !defined(MACH_KDB) || MACH_KDB
244
245 #if !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
246
247 /*
248 * Return the type and address of the kernel object
249 * that the given send/receive right represents.
250 */
251
252 routine mach_port_kernel_object(
253 task : ipc_space_t;
254 name : mach_port_name_t;
255 out object_type : unsigned;
256 out object_addr : vm_offset_t);
257
258 #else !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
259 skip; /* mach_port_kernel_object */
260 #endif !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG
261
262 #if !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
263
264 /*
265 * Returns information about a region of memory.
266 */
267
268 routine mach_vm_region_info(
269 task : vm_task_t;
270 address : vm_address_t;
271 out region : vm_region_info_t;
272 /* avoid out-translation of the argument */
273 out object : memory_object_name_t =
274 MACH_MSG_TYPE_MOVE_SEND
275 ctype: mach_port_t);
276
277 routine mach_vm_object_info(
278 object : memory_object_name_t;
279 out info : vm_object_info_t;
280 /* avoid out-translation of the argument */
281 out shadow : memory_object_name_t =
282 MACH_MSG_TYPE_MOVE_SEND
283 ctype: mach_port_t;
284 /* avoid out-translation of the argument */
285 out copy : memory_object_name_t =
286 MACH_MSG_TYPE_MOVE_SEND
287 ctype: mach_port_t);
288
289 routine mach_vm_object_pages(
290 object : memory_object_name_t;
291 out pages : vm_page_info_array_t,
292 CountInOut, Dealloc);
293
294 #else !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
295 skip; /* mach_vm_region_info */
296 skip; /* mach_vm_object_info */
297 skip; /* mach_vm_object_pages */
298 #endif !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG
Cache object: d9976c7684f03cf8022d5f6f0fe396d9
|