summaryrefslogtreecommitdiff
path: root/include/mach_debug/mach_debug.defs
blob: c59436c683ccc244443a8a028b61cdf033868e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/*
 * Mach Operating System
 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
 * All Rights Reserved.
 *
 * Permission to use, copy, modify and distribute this software and its
 * documentation is hereby granted, provided that both the copyright
 * notice and this permission notice appear in all copies of the
 * software, derivative works or modified versions, and any portions
 * thereof, and that both notices appear in supporting documentation.
 *
 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
 *
 * Carnegie Mellon requests users of this software to return to
 *
 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
 *  School of Computer Science
 *  Carnegie Mellon University
 *  Pittsburgh PA 15213-3890
 *
 * any improvements or extensions that they make and grant Carnegie Mellon
 * the rights to redistribute these changes.
 */
/*
 *	Matchmaker definitions file for Mach kernel debugging interface.
 */

subsystem
#if	KERNEL_SERVER
	  KernelServer
#endif	/* KERNEL_SERVER */
		       mach_debug 3000;

#include <mach/std_types.defs>
#include <mach/mach_types.defs>
#include <mach_debug/mach_debug_types.defs>

skip;	/* host_ipc_statistics */
skip;	/* host_ipc_statistics_reset */
skip;	/* host_callout_info */
skip;	/* host_callout_statistics */
skip;	/* host_callout_statistics_reset */
skip;	/* host_zone_info */
skip;	/* host_ipc_bucket_info */

#if	!defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG

/*
 *	Returns the exact number of extant send rights
 *	for the given receive right.
 */

routine	mach_port_get_srights(
		task		: ipc_space_t;
		name		: mach_port_name_t;
	out	srights		: mach_port_rights_t);

skip;	/* host_ipc_hash_info */

/*
 *	Returns information about the marequest hash table.
 */

routine host_ipc_marequest_info(
		host		: host_t;
	out	max_requests	: unsigned;
	out	info		: hash_info_bucket_array_t,
					CountInOut, Dealloc);

skip;	/* mach_port_space_info */

/*
 *	Returns information about the dead-name requests
 *	registered with the named receive right.
 */

routine mach_port_dnrequest_info(
		task		: ipc_space_t;
		name		: mach_port_name_t;
	out	total		: unsigned;	/* total size of table */
	out	used		: unsigned);	/* amount used */

#else	/* !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG */
skip;	/* mach_port_get_srights */
skip;	/* host_ipc_hash_info */
skip;	/* host_ipc_marequest_info */
skip;	/* mach_port_space_info */
skip;	/* mach_port_dnrequest_info */
#endif	/* !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG */

skip;	/* mach_vm_region_info */
skip;	/* vm_mapped_pages_info */

/*
 *	Returns stack usage information:
 *		reserved	Amount of stack space reserved for pcb.
 *		total		Number of stacks.
 *		space		Total VM space for stacks.
 *		resident	Resident VM space for stacks.
 *		maxusage	Maximum amount of stack used.
 *		maxstack	Address in the kernel of the largest stack.
 */

routine host_stack_usage(
		host		: host_t;
	out	reserved	: vm_size_t;
	out	total		: unsigned;
	out	space		: vm_size_t;
	out	resident	: vm_size_t;
	out	maxusage	: vm_size_t;
	out	maxstack	: vm_offset_t);

routine processor_set_stack_usage(
		pset		: processor_set_name_t;
	out	total		: unsigned;
	out	space		: vm_size_t;
	out	resident	: vm_size_t;
	out	maxusage	: vm_size_t;
	out	maxstack	: vm_offset_t);

skip;	/* host_virtual_physical_table_info */

#if	!defined(MACH_KDB) || MACH_KDB
/*
 *	Loads a symbol table for an external file into the kernel debugger.
 *	The symbol table data is an array of characters.  It is assumed that
 *	the caller and the kernel debugger agree on its format.
 */

routine host_load_symbol_table(
		host		: host_priv_t;
		task		: task_t;
		name		: symtab_name_t;
		symtab		: pointer_t);

#else	/* !defined(MACH_KDB) || MACH_KDB */
skip;	/* host_load_symbol_table */
#endif	/* !defined(MACH_KDB) || MACH_KDB */

#if	!defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG

/*
 *	Return the type and address of the kernel object
 *	that the given send/receive right represents.
 */

routine	mach_port_kernel_object(
		task		: ipc_space_t;
		name		: mach_port_name_t;
	out	object_type	: unsigned;
	out	object_addr	: vm_offset_t);

#else	/* !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG */
skip;	/* mach_port_kernel_object */
#endif	/* !defined(MACH_IPC_DEBUG) || MACH_IPC_DEBUG */

#if	!defined(MACH_VM_DEBUG) || MACH_VM_DEBUG

/*
 *	Returns information about a region of memory.
 */

routine mach_vm_region_info(
		task		: vm_task_t;
		address		: vm_address_t;
	out	region		: vm_region_info_t;
	/* avoid out-translation of the argument */
	out	object		: memory_object_name_t =
					MACH_MSG_TYPE_MOVE_SEND
					ctype: mach_port_t);

routine mach_vm_object_info(
		object		: memory_object_name_t;
	out	info		: vm_object_info_t;
	/* avoid out-translation of the argument */
	out	shadow		: memory_object_name_t =
					MACH_MSG_TYPE_MOVE_SEND
					ctype: mach_port_t;
	/* avoid out-translation of the argument */
	out	copy		: memory_object_name_t =
					MACH_MSG_TYPE_MOVE_SEND
					ctype: mach_port_t);

routine mach_vm_object_pages(
		object		: memory_object_name_t;
	out	pages		: vm_page_info_array_t,
					CountInOut, Dealloc);

#else	/* !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG */
skip;	/* mach_vm_region_info */
skip;	/* mach_vm_object_info */
skip;	/* mach_vm_object_pages */
#endif	/* !defined(MACH_VM_DEBUG) || MACH_VM_DEBUG */

/*
 *	Returns information about the memory allocation caches.
 */
routine host_slab_info(
		host		: host_t;
	out	info		: cache_info_array_t,
					CountInOut, Dealloc);