Implementation sources
Exceptions & traps
The arm64 exception path, the Mach trap and BSD syscall dispatch tables, and the register and saved-state accessors behind them.
osfmk/arm64/locore.sosfmk/arm64/sleh.cosfmk/arm64/start.sosfmk/kern/syscall_sw.cbsd/dev/arm/systemcalls.cosfmk/kern/exception.cosfmk/arm64/proc_reg.hosfmk/mach/arm/thread_status.hosfmk/kern/exception.hosfmk/kern/thread.hDebugging
Panic, the in-kernel debugger, and the Kernel Debug Protocol (KDP) used by remote debuggers and core dumps.
osfmk/kern/debug.hosfmk/kern/debug.cosfmk/kdp/kdp.cosfmk/kdp/kdp_core.hUserspace debugging
Task-port authorization, task and thread suspension, exception-port ownership, arm64 debug state, and executable-memory updates. These implementation references use the pinned XNU checkout; current SDK declarations remain in the API reference.
bsd/kern/kern_proc.cosfmk/kern/task.cosfmk/kern/thread_act.cosfmk/kern/ipc_tt.cosfmk/arm64/status.cosfmk/arm64/pcb.cosfmk/vm/vm_user.cosfmk/vm/vm_map.cosfmk/arm/pmap/pmap.cosfmk/ipc/ipc_right.cMIG (Mach Interface Generator)
The migcom compiler (from Apple’s bootstrap_cmds) that turns .defs interface files into the C stubs and Request/Reply message structs behind the Mach routines — the code generating what you see on the header pages.
bootstrap_cmds/migcom.tproj/mig.cbootstrap_cmds/migcom.tproj/header.cbootstrap_cmds/migcom.tproj/user.cbootstrap_cmds/migcom.tproj/server.cbootstrap_cmds/migcom.tproj/routine.cbootstrap_cmds/migcom.tproj/type.cLLDB debugserver
Apple’s user-space debugger server implementation: acquiring a task port, installing and restoring exception ports, coordinating task and thread suspension, writing executable memory, and arm64 hardware single stepping.
llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mmllvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cppllvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mmllvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cppllvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cppllvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cppllvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp