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

后端 未结 12 2045
青春惊慌失措
青春惊慌失措 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:17

    This link had the clearest and most detailed step-by-step to make this error disappear for me.

    In my case I had to have the key as a "System" key otherwise it did not work (which not every url mentions).

    Also killing taskgated is a viable (and quicker) alternative to having to restart.

    I also uninstalled MacPorts before I started this process and uninstalled the current gdb using brew uninstall gdb.

提交回复
热议问题