[all-commits] [llvm/llvm-project] 21b5eb: [ORC][LLJIT] Add LLJITBuilder convenience function...

lhames via All-commits all-commits at lists.llvm.org
Sun Apr 16 12:23:47 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21b5ebd245c88c81fe09248c7dce5cc3e0e56cae
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-04-16 (Sun, 16 Apr 2023)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/tools/lli/lli.cpp

  Log Message:
  [ORC][LLJIT] Add LLJITBuilder convenience function to enable debugger support.

Clients can now call LLJITBuilder::setEnableDebuggerSupport to enable
registration of debug info via the GDB-JIT registration protocol for JIT'd

Calling LLJITBuilder::setEnableDebuggerSupport(true) will cause LLJITBuilder to
add either a DebugObjectManagerPlugin (if the object format on the triple is
ELF), or a GDBJITDebugInfoRegistrationPlugin (if the object format on the
triple is MachO). At present there is no support for debugging when using COFF.

This debugger registration support will only work when JITLink is used as the
underlying JIT linker.

This patch only addresses registration of JIT'd code by the JIT. To debug JIT'd
code you may also need to enable JIT'd code debugging in your debugger. E.g.
when debugging MachO JIT'd code under LLDB you will currently need to run
(lldb) set set plugin.jit-loader.gdb.enable on
to tell LLDB to listen for JIT'd code registration.

More information about the All-commits mailing list