Issue
While trying to debug my C code snippet with Eclipse, it shows out the following popup.
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Unable to find Mach task port for process-id 4550: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))
Unable to find Mach task port for process-id 4550: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))
Is there a solution for this matter? Also, I want to ask you if it actually bothers a lot to use Eclipse when writing a code in C. I never had this kinds of trouble when I first started learning Xcode, but now there seems to be quite a lot of things I should care with Eclipse.
Solution
From Community Forums
When CDT launches, it tries to set a breakpoint at main, so it will interrupt execution when your program starts. However, your target is already running so the breakpoint cannot be set and the whole things fails.
You could simply tell your launch not to set that breakpoint and let it connect to your target. Go to:
Run->Debug Configurations...
and find yourlaunch configuration
. Then select theStartup subtab
, scroll down anduncheck "Set breakpoint at"
in the"Runtime options"
subsection.
or See gdb fails with “Unable to find Mach task port for process-id” error
Answered By - Sumit Singh
Answer Checked By - Robin (JavaFixing Admin)