[LLVMdev] gdb on Mach-O

Reid Kleckner rnk at mit.edu
Tue Jan 26 14:32:52 PST 2010


I only implemented support for ELF, and I don't think anyone else has
gone back and added Mach-O.  I'd like it to happen, though, since it
would mean that when Unladen Swallow lands, CPython developers would
be able to use gdb with the JIT.

In order to use gdb + LLVM's JIT on OS X, though, you need to be able
to build the FSF's gdb (7.0+) from source, since the version of gdb
that Apple distributes doesn't have the relevant patches.  I wrote the
gdb patch while working at Google, and they agreed to relicense it
under the GPLv2 so that Apple can use it.  I haven't heard back from
the Apple debugger team about it yet.

I should also note that right now this support will only buy you a few
things: symbols for JITed frames, the ability to run 'disas' on those
frames, and the ability to unwind the stack on x86_64.  When the DOE +
MC situation improves and LLVM can generate it's own DWARF without
going through assembly, it shouldn't be too hard to add more DWARF.

Reid

On Tue, Jan 26, 2010 at 2:33 PM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote:
> According to http://llvm.org/docs/DebuggingJITedCode.html only ELF objects are supported for gdb support of
> JIT generated code. Is this still true, or are Mach-O files now supported in 2.7 trunk?
>
> Thanks in advance
>
> Garrison
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list