[lldb-dev] JIT debugging on Mac OSX

HaiTao Feng haitao.feng at gmail.com
Sat Jul 6 05:58:39 PDT 2013


Hi,

How does JIT debugging feature work on Mac OSX?

It seems that some LLVM documents implied lldb supports JIT debugging on
Mac OSX.
  1) "LLDB may be a better option for debugging JIT-ed code on Mac OS X."
from http://llvm.org/docs/DebuggingJITedCode.html.
  2)  "Upcoming features include JIT debugging, core file support and
support of new processor features." in the section of "Recent LLDB packages
have closed some of the feature gap with LLDB on Linux relative to Darwin."
from http://blog.llvm.org/2013/06/lldb-33-and-beyond.html.

I tried to use LLDB to debug the test case mentioned in
http://llvm.org/docs/DebuggingJITedCode.html, but found that the JITed
function names are not shown in the stack backtrace. From the LLVM source
codes, there is only a gdb register for ELF format in MCJIT, for MachO, the
debugger register is {}. Do I need some compiler time or runtime
configuration to make lldb debug Jitted code?

The discussion I could find in the mailing list was
http://lists.cs.uiuc.edu/pipermail/lldb-dev/2010-December/000314.html.
The interface
in that patch looked like "__jit_debug_register_code" provided from gdb,
but that patch was not merged in master.

Thanks
-Haitao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130706/bd9c94e3/attachment.html>


More information about the lldb-dev mailing list