Jump to content

Debugging natively with gdb often locks up the host process

Xcode Qt Creator gdb

  • Please log in to reply
1 reply to this topic

#1
kode54

kode54

    InsanelyMac Protégé

  • Members
  • Pip
  • 25 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.



#2
kode54

kode54

    InsanelyMac Protégé

  • Members
  • Pip
  • 25 posts

Bump.

 

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.







Also tagged with one or more of these keywords: Xcode, Qt Creator, gdb


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy