[ORC] Initial MachO debugging support (via GDB JIT debug registration interface)
authorLang Hames <lhames@gmail.com>
Thu, 11 Nov 2021 23:19:21 +0000 (15:19 -0800)
committerLang Hames <lhames@gmail.com>
Sat, 13 Nov 2021 21:21:01 +0000 (13:21 -0800)
commite1933a0488a50eb939210808fc895d374570d891
tree422dfbda0020ea4dfeb9758226d0d22f7bdd7369
parentc35e8185d8c170c20e28956e0c9f3c1be895fefb
[ORC] Initial MachO debugging support (via GDB JIT debug registration interface)

This commit adds a new plugin, GDBJITDebugInfoRegistrationPlugin, that checks
for objects containing debug info and registers any debug info found via the
GDB JIT registration API.

To enable this registration without redundantly representing non-debug sections
this plugin synthesizes a new embedded object within a section of the LinkGraph.
An allocation action is used to make the registration call.

Currently MachO only. ELF users can still use the DebugObjectManagerPlugin. The
two are likely to be merged in the near future.
llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
llvm/include/llvm/ExecutionEngine/Orc/DebuggerSupportPlugin.h [new file with mode: 0644]
llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp
llvm/test/ExecutionEngine/JITLink/X86/MachO_gdb_jit_debuginfo_register.s [new file with mode: 0644]
llvm/test/ExecutionEngine/JITLink/X86/MachO_skip_debug_sections.s [deleted file]
llvm/tools/llvm-jitlink/llvm-jitlink.cpp