[macos] gdb fails with "Unable to find Mach task port for process-id" error

I followed this tutorial, and everything is OK.