1 <h2>task_get_exception_ports
</h2>
4 <strong>Function
</strong> - Return send rights to the target task's exception ports.
7 <strong>kern_return_t task_get_exception_ports
</strong>
8 <strong>(task_t
</strong> <var>task
</var>,
9 <strong>exception_mask_t
</strong> <var>exception_types
</var>,
10 <strong>exception_mask_array_t
</strong> <var>old_exception_masks
</var>,
11 <strong>old_exception_masks
</strong> <var>old_exception_count
</var>,
12 <strong>exception_port_array_t
</strong> <var>old_exception_ports
</var>,
13 <strong>exception_behavior_array_t
</strong> <var>old_behaviors
</var>,
14 <strong>exception_flavor_array_t
</strong> <var>old_flavors
</var><strong>);
</strong>
22 The task for which to return the exception ports.
24 <dt> <var>exception_types
</var>
27 A flag word indicating the types of exceptions for which the
28 exception ports are desired:
31 <dt> <strong>EXC_MASK_BAD_ACCESS
</strong>
33 Could not access memory.
35 <dt> <strong>EXC_MASK_BAD_INSTRUCTION
</strong>
37 Instruction failed. Illegal or undefined instruction or operand.
39 <dt> <strong>EXC_MASK_ARITHMETIC
</strong>
43 <dt> <strong>EXC_MASK_EMULATION
</strong>
45 Emulation instruction. Emulation support instruction
48 <dt> <strong>EXC_MASK_SOFTWARE
</strong>
50 Software generated exception.
52 <dt> <strong>EXC_MASK_BREAKPOINT
</strong>
54 Trace, breakpoint, etc.
56 <dt> <strong>EXC_MASK_SYSCALL
</strong>
58 System call requested.
60 <dt> <strong>EXC_MASK_MACH_SYSCALL
</strong>
62 System call with a number in the Mach call range requested.
64 <dt> <strong>EXC_MASK_RPC_ALERT
</strong>
66 Exceptional condition encountered during execution of RPC.
69 <dt> <var>old_exception_masks
</var>
71 [out array of
<var>exception_mask_t
</var>]
72 An array, each element being a mask
73 specifying for which exception types the corresponding element of the
76 <dt> <var>old_exception_count
</var>
78 [pointer to in/out scalar]
79 On input, the maximum size of the array
80 buffers; on output, the number of returned
<exception type mask,
81 exception port, behavior, flavor
> sets returned.
83 <dt> <var>old_exception_ports
</var>
85 [out array of exception send rights]
86 The returned exception ports.
88 <dt> <var>old_behaviors
</var>
90 [out array of
<var>exception_behavior_t
</var>]
91 The type of exception message to
92 be sent. Defined types are:
95 <dt> <strong>EXCEPTION_DEFAULT
</strong>
97 Send a
<strong>catch_exception_raise
</strong> message including the thread identity.
99 <dt> <strong>EXCEPTION_STATE
</strong>
101 Send a
<strong>catch_exception_raise_state
</strong> message including the
104 <dt> <strong>EXCEPTION_STATE_IDENTITY
</strong>
106 Send a
<strong>catch_exception_raise_state_identity
</strong> message
107 including the thread identity and state.
110 <dt> <var>old_flavors
</var>
112 [out array of
<var>thread_state_flavor_t
</var>]
113 The type of state to be sent with
114 the exception message. These types are defined in
<strong><mach/thread_states.h>
</strong>.
118 The
<strong>task_get_exception_ports
</strong> function returns send
119 rights for a specified set
120 of exception ports belonging to task. A task exception port is used when a
121 thread specific exception port returns a non-success reply.
122 The call returns a set
123 of quadruples
<exception type mask, exception port, behavior, flavor
> for each
124 unique set of
<exception port, behavior, flavor
> in effect for
126 exception type mask indicates for which exception types the other values apply.
127 <h3>RETURN VALUES
</h3>
129 Only generic errors apply.
130 <h3>RELATED INFORMATION
</h3>
133 <a href=
"mach_task_self.html"><strong>mach_task_self
</strong></a>,
134 <a href=
"thread_get_exception_ports.html"><strong>thread_get_exception_ports
</strong></a>,
135 <a href=
"task_set_exception_ports.html"><strong>task_set_exception_ports
</strong></a>,
136 <a href=
"task_swap_exception_ports.html"><strong>task_swap_exception_ports
</strong></a>,
137 <a href=
"thread_create.html"><strong>thread_create
</strong></a>,
138 <a href=
"thread_set_exception_ports.html"><strong>thread_set_exception_ports
</strong></a>,
139 <a href=
"TS_exception_ports.html"><strong>thread_swap_exception_ports
</strong></a>,
140 <a href=
"catch_exception_raise.html"><strong>catch_exception_raise
</strong></a>.