Debug just-in-time compiled code on Mac OS

Hey guys,

I'd need to debug just-in-time compiled code under Mac OS. As predicted, GDB doesn't cope really well with it. The LLVM manual seems to say it's possible to patch GDB under Linux, but there seems to be no option for Mac OS.

What can I do? I'd prefer a solution that integrates with Xcode, but I'll manage if it doesn't and I have to run the debugger externally.

It's not really related to this mailing list, but is LLDB doing a better job at handling just-in-time compiled code?


I'm assuming you're looking at this document?

That document should probably be updated to say you need GDB 7.0 or
newer, since that's when the feature was released. Most Linux
distributions have picked this up, so it should Just Work on Linux.

Apple's GDB is stale (6.3 + lots of patches). They've stopped
updating the version of GDB they ship with XCode, and now they're
spending their time working on LLDB.


Yeah, that’s what I read.

I downloaded and compiled LLDB and it works okay for what I’m doing (at least it’s not going crazy with JIT-compiled functions). Looking forward having this in Xcode.


(Sorry for the double mail, Reid. I still suck at clicking ‘Reply to All’.)

I am so so happy that LLDB is coming along.

I've only been seriously using Xcode with GDB for three or four months now, but man what a POS compared with the stuff I'm used to. I really really hated programming on Windows but VS's debugger was miles ahead of the GDB/Xcode combo. I'm sure everyone at Apple is thrilled to be getting a new debugger, as they've been using GDB much more than I have, and it must really hurt to have Microsoft busting your balls on technology. I mean, come on, Microsoft couldn't punch their way out of a paper bag when it come to inventing cool technology.

LLVM and now LLDB, however, very cool stuff. As an old-time Mac developer from back in the days when object-oriented meant MacApp, it brings tears to my eyes.

- Curtis