Back to Darwin Xnu

Task Get Exception Ports

osfmk/man/task_get_exception_ports.html

latest3.3 KB
Original Source

task_get_exception_ports


Function - Return send rights to the target task's exception ports.

SYNOPSIS

**kern\_return\_t task\_get\_exception\_ports**** (task\_t **task,** exception\_mask\_t **exception\_types,** exception\_mask\_array\_t **old\_exception\_masks,** old\_exception\_masks **old\_exception\_count,** exception\_port\_array\_t **old\_exception\_ports,** exception\_behavior\_array\_t **old\_behaviors,** exception\_flavor\_array\_t **old\_flavors** );**

PARAMETERS

task[in task send right] The task for which to return the exception ports.

exception_types[in scalar] A flag word indicating the types of exceptions for which the exception ports are desired:

EXC_MASK_BAD_ACCESS Could not access memory.

EXC_MASK_BAD_INSTRUCTION Instruction failed. Illegal or undefined instruction or operand.

EXC_MASK_ARITHMETIC Arithmetic exception

EXC_MASK_EMULATION Emulation instruction. Emulation support instruction encountered.

EXC_MASK_SOFTWARE Software generated exception.

EXC_MASK_BREAKPOINT Trace, breakpoint, etc.

EXC_MASK_SYSCALL System call requested.

EXC_MASK_MACH_SYSCALL System call with a number in the Mach call range requested.

EXC_MASK_RPC_ALERT Exceptional condition encountered during execution of RPC.

old_exception_masks[out array of exception_mask_t] An array, each element being a mask specifying for which exception types the corresponding element of the other arrays apply.

old_exception_count[pointer to in/out scalar] On input, the maximum size of the array buffers; on output, the number of returned sets returned.

old_exception_ports[out array of exception send rights] The returned exception ports.

old_behaviors[out array of exception_behavior_t] The type of exception message to be sent. Defined types are:

EXCEPTION_DEFAULT Send a catch_exception_raise message including the thread identity.

EXCEPTION_STATE Send a catch_exception_raise_state message including the thread state.

EXCEPTION_STATE_IDENTITY Send a catch_exception_raise_state_identity message including the thread identity and state.

old_flavors[out array of thread_state_flavor_t] The type of state to be sent with the exception message. These types are defined in &ltmach/thread_states.h&gt.

DESCRIPTION

The task_get_exception_ports function returns send rights for a specified set of exception ports belonging to task. A task exception port is used when a thread specific exception port returns a non-success reply. The call returns a set of quadruples for each unique set of in effect for the task where the exception type mask indicates for which exception types the other values apply.

RETURN VALUES

Only generic errors apply.

Functions: mach_task_self, thread_get_exception_ports, task_set_exception_ports, task_swap_exception_ports, thread_create, thread_set_exception_ports, thread_swap_exception_ports, catch_exception_raise.