gdb fails with “Unable to find Mach task port for process-id” error

后端 未结 12 2089
青春惊慌失措
青春惊慌失措 2020-11-28 19:02

My app runs fine but gdb fails to debug it with the following error

(gdb) run
Starting program: /path/to/app 
Unable to find Mach task port for process-id 83         


        
12条回答
  •  佛祖请我去吃肉
    2020-11-28 19:30

    I needed this command to make it work on El Capitan:

    sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/gdb-cert.cer
    

提交回复
热议问题