OSX Mavericks + GDB - anyone have success

CodeLite installation/troubleshooting forum
mhackney
CodeLite Curious
Posts: 6
Joined: Thu Jan 09, 2014 9:46 pm
Genuine User: Yes
IDE Question: C++
Contact:

OSX Mavericks + GDB - anyone have success

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: OSX Mavericks + GDB - anyone have success

Post 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
Make sure you have read the HOW TO POST thread
mhackney
CodeLite Curious
Posts: 6
Joined: Thu Jan 09, 2014 9:46 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: OSX Mavericks + GDB - anyone have success

Post 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.
Post Reply