Page 1 of 1

OSX Mavericks + GDB - anyone have success

Posted: Wed Feb 26, 2014 8:52 pm
by mhackney
Basically, in Mavericks, Apple no longer installs or provides GDB in the command line tools. Unfortunately, I have to upgrade OS as frequently as they come out. So now, everyone on Mac using GDB has to scramble. There are lots of tutorials on building GDB on OSX and that step was easy. Then the challenge becomes signing the GDB binary so it can attach to the process being debugged. This tutorial also addresses that with creating a certificate and signing gdb. Then you have to restart tasted (or reboot). This is all supposed to work. I've gone through this process several times, rebuilding both gdb and the certificate from scratch, rebooting, etc but I still get the error:

Debugger exited with the following error string:
"Unable to find Mach task port for process-id 649: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))"

When attempting to debug in CodeLite. Has anyone had any success using GDB on Mavericks in CL?

thanks!
Michael

Re: OSX Mavericks + GDB - anyone have success

Posted: Wed Feb 26, 2014 9:03 pm
by eranif
mhackney wrote:When attempting to debug in CodeLite. Has anyone had any success using GDB on Mavericks in CL?
It seems like your problem is running gdb (with or without codelite)
You can try this:
- Copy gdb from 10.8.X and try it instead
- Debug from the command line using lldb
- Wait for codelite 6.0 and debug with lldb (lldb support is on the road map)

Here is CodeLite 6.0 planned content (main features, bugs are not mentioned here):
http://codelite.org/LiteEditor/ReleaseNotesCodeLite60

Eran

Re: OSX Mavericks + GDB - anyone have success

Posted: Wed Feb 26, 2014 9:19 pm
by mhackney
I *think* I found it...

I had fetched the gdb sources into my Downloads folder. I then built in Downloads and did not 'make install'. GDB started up and gave a help dump so I assumed all was ok.

After writing the above post, I went through the entire process again and this time without even stopping to think about it, did a 'make install'. I signed the exe and then pointed CL at the /usr/local/bin/gdb location. All is good and I can debug using GDB on Mavericks in CL.