A system call responsible for a process attaching itself to another process: ptrace.
sudo dtrace -ln 'syscall:::entry'sudo dtrace -qn 'syscall::ptrace:entry { printf("%s(%d, %d, %d, %d) from %s\n", probefunc, arg0, arg1, arg2, arg3, execname); }lldb -n Finderpgrep debugserverps -fp `pgrep -x debugserver`ps -o ppid= $(pgrep -x debugserver)
ps -a 856sudo lldb -n "<program name>" -wrb ptrace -s libsystem_kernel.dylibcontinuethread return 0