This is because modern Darwin kernels restrict the capability to assume control over another process (here, for the purpose of debugging it), since that capability is a boon to malware. (please check gdb is codesigned - see taskgated(8)) Unable to find Mach task port for process-id 28885: (os/kern) failure (0x5). If you try to use your freshly built gdb, you might get an error message such as: