3

I installed gdb via brew and also code-signed it. But even after doing that I am getting this error.

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 14291: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))
Unable to find Mach task port for process-id 14291: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))

Any suggestions as what is going wrong and what I should do?

1
  • I recently ran into this again and was able to make do by prefixing sudo, did you try that?
    – oarfish
    Jan 3, 2015 at 19:47

1 Answer 1

2

Answering my own question. I had to follow the steps enlisted here to get past this error.

  1. Creating a Code-Sign System Certificate from Keychain Access.
  2. Marking that Certificate to Trust Always. This is important.
  3. Finally code signing the gdb executable codesign -s gdb-cert /path/to/gdb

With this, I was able to use gdb on mavericks.

4
  • Did you simply brew install gdb? I installed both GCC 4.9 and GDB 7.7.1 on Mavericks via Homebrew, but GDB does not work entirely correctly. I can set breakpoints, but cannot query the values of variables. GDB always reports that it could not find the frame base for some functions. Apparently many people also encounter the same problem. Would you please elaborate on how GCC and GDB were installed on your Mac?
    – user1551
    Aug 4, 2014 at 17:07
  • I installed it via brew. I don't remember the steps now, but did not struggle much. Aug 9, 2014 at 23:16
  • Thanks. I guess this kind of problem is very hard to resolve.
    – user1551
    Aug 10, 2014 at 8:24
  • I've followed these steps on Yosemite, and it still doesn't work. I can run gdb as root, however.
    – Tim Harper
    Sep 28, 2015 at 7:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .