Implementation sources
Exceptions & traps
Exception vectors and first-level handlers
osfmk/arm64/locore.sSecond-level exception handlers
osfmk/arm64/sleh.cKernel entry and CPU bring-up
osfmk/arm64/start.sMach trap table
osfmk/kern/syscall_sw.cBSD system call dispatch (arm)
bsd/dev/arm/systemcalls.cMach exception delivery
osfmk/kern/exception.cProcessor and exception-syndrome registers (arm64)
osfmk/arm64/proc_reg.hSaved-state (exception frame) accessors
osfmk/mach/arm/thread_status.hException delivery structures
osfmk/kern/exception.hThread and thread_ro structures
osfmk/kern/thread.hTask & thread coordination
Task restartable ranges changed
osfmk/kern/restartable.clibpthread
Thread creation, lifetime, and attributes
libpthread/src/pthread.cpthread mutexes
libpthread/src/pthread_mutex.cpthread condition variables
libpthread/src/pthread_cond.cpthread read-write locks
libpthread/src/pthread_rwlock.cThread-specific data
libpthread/src/pthread_tsd.cFork handlers
libpthread/src/pthread_atfork.cCancellation and join
libpthread/src/pthread_cancelable.cpthread quality of service
libpthread/src/qos.cDebugging
Kernel debugging and panic API
osfmk/kern/debug.hPanic and debugger entry
osfmk/kern/debug.cKernel Debug Protocol (KDP)
osfmk/kdp/kdp.cKernel core dumps
osfmk/kdp/kdp_core.hUserspace debugging
Task-port access and authorization
bsd/kern/kern_proc.cTask suspension, resume tokens, and thread enumeration
osfmk/kern/task.cThread suspension, aborts, and state access
osfmk/kern/thread_act.cException-port registration and restoration
osfmk/kern/ipc_tt.carm64 register and debug-state access
osfmk/arm64/status.carm64 debug-register installation
osfmk/arm64/pcb.cDebugger memory operations and cache attributes
osfmk/vm/vm_user.cVM protection, code writes, and target cache traversal
osfmk/vm/vm_map.cPhysical-page instruction-cache synchronization
osfmk/arm/pmap/pmap.cIPC rights and reply-port copyin checks
osfmk/ipc/ipc_right.cMIG (Mach Interface Generator)
MIG compiler driver
bootstrap_cmds/migcom.tproj/mig.cMIG codegen: header (.h)
bootstrap_cmds/migcom.tproj/header.cMIG codegen: user stubs
bootstrap_cmds/migcom.tproj/user.cMIG codegen: server demux
bootstrap_cmds/migcom.tproj/server.cMIG routine model
bootstrap_cmds/migcom.tproj/routine.cMIG type marshaling
bootstrap_cmds/migcom.tproj/type.cLLDB debugserver
debugserver task control and exception thread
llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mmdebugserver Mach exception messages and saved ports
llvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cppdebugserver process launch, attach, stop, and resume
llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mmdebugserver per-thread suspension and resume preparation
llvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cppdebugserver all-stop thread coordination
llvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cppdebugserver memory writes and instruction-cache flushes
llvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cppdebugserver arm64 single-step state
llvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cppDebugging references
GNU Mach kernel debugger (ddb)the built-in interactive kernel debugger — commands, variables, expressions