Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  

Debugging natively with gdb often locks up the host process

2 posts in this topic

Recommended Posts

I recently installed 10.8 on this machine, updated it to 10.8.4, fetched Xcode from the App Store using my existing account, then installed the command line tools. I've also since installed Qt Creator and built my own Qt 4.8.4 so I could incorporate a patch for detecting Growl 1.3.


The problem happens whenever I try launching something under gdb and setting breakpoints, either using Xcode or Qt Creator. The process is launched, a sudo prompt appears to allow the debugger to attach to the process, then the process resumes. My process has a file open dialog, after which execution would have reached the break point I set. Randomly, it will reach the break point. Other times, the file open dialog will stay open, I'll hear an error sound, the Qt Creator icon will bounce once on the dock, then both the test program and Qt Creator will lock up completely. Their processes don't even respond to force quit or kill -9. The only solution I've found is to furiously stab the reset button on my machine.


I had read about some break point issue with debugging under some other kernel from back in 2011, which required setting some kernel parameter to force a standard dyld module of some sort, but I don't know if that even applies today.


I am hoping this problem is unique to non-Apple hardware, as not being able to debug software would seriously impair my future plans of buying either a Mac Book Air or one of those shiny new Mac Pro machines.


I haven't tested if I can operate break points under Parallels yet, but I do recall hardware break point type problems causing hard lock ups even on my previous desktop under 10.7. It seriously irked me back then, too, but I didn't think to ask anyone about it, as I thought maybe it was just one of the known quirks of running it on non-Apple systems.

Share this post

Link to post
Share on other sites



Seems the issue was introduced with gdb-1824, which was introduced in Xcode 4.6.


And it seems Apple's workaround with new versions of Xcode for Mavericks is to remove gdb entirely. Fine by me, if they can't fix it or pick up fixes from newer versions because the license is too restrictive for them to touch it any more.


It looks like LLDB has replaced it. Qt Creator even has experimental support for LLDB.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.