init(named:mask:behavior:threadStateFlavor:)
Creates an exception port.
init(named name: mach_port_name_t, mask: Mach.ExceptionMask = .all, behavior: Mach.ExceptionBehavior = .default, threadStateFlavor: Mach.ThreadStateFlavor = .none)
Creates an exception port.
init(named name: mach_port_name_t, mask: Mach.ExceptionMask = .all, behavior: Mach.ExceptionBehavior = .default, threadStateFlavor: Mach.ThreadStateFlavor = .none)
s8MachCore0A0V13ExceptionPortC5named4mask8behavior17threadStateFlavorAEs6UInt32V_AC0C4MaskVAC0C8BehaviorVAC06ThreadiJ0Vtcfc
What are these?5N17Y
import MachCore
The core module for interacting with the Mach kernel.
class ExceptionPort
An exception port.
struct Mach
The Mach kernel.
struct ExceptionMask
A mask for getting or setting exception ports.
struct ExceptionBehavior
A behavior for an exception.
struct ThreadStateFlavor
A flavor of thread state.
static func addExceptionPort(_ port: Mach.ExceptionPort, toHost host: Mach.Host) throws
Adds an exception port to the host.
static func addExceptionPort(_ port: Mach.ExceptionPort, toTask task: Mach.Task) throws
Adds an exception port to the task.
static func addExceptionPort(_ port: Mach.ExceptionPort, toThread thread: Mach.Thread) throws
Adds an exception port to the thread.
static func exceptionPorts(forHost host: Mach.Host, mask: Mach.ExceptionMask) throws -> [Mach.ExceptionPort]
Gets the exception ports for the host that catch the exception types specified by the mask.
static func exceptionPorts(forTask task: Mach.Task, mask: Mach.ExceptionMask) throws -> [Mach.ExceptionPort]
Gets the exception ports for the task that catch the exception types specified by the mask.
static func exceptionPorts(forThread thread: Mach.Thread, mask: Mach.ExceptionMask) throws -> [Mach.ExceptionPort]
Gets the exception ports for the thread that catch the exception types specified by the mask.
let behavior: Mach.ExceptionBehavior
The behavior of the exception.
let mask: Mach.ExceptionMask
The mask of the exception types that the port will catch.
let threadStateFlavor: Mach.ThreadStateFlavor
The flavor of the thread state to send with exception messages.
func raise(_ type: Mach.ExceptionType, code: Int32, subcode: Int32, inThread thread: Mach.Thread = Mach.Thread.current, inTask task: Mach.Task = Mach.Task.current, wasMaybePACFail: Bool = false) throws
Raise an exception.