|
10 | 10 | #include "llvm/ExecutionEngine/JITLink/EHFrameSupport.h" |
11 | 11 | #include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h" |
12 | 12 | #include "llvm/ExecutionEngine/Orc/COFFPlatform.h" |
13 | | -#include "llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h" |
14 | | -#include "llvm/ExecutionEngine/Orc/DebuggerSupportPlugin.h" |
15 | 13 | #include "llvm/ExecutionEngine/Orc/ELFNixPlatform.h" |
16 | 14 | #include "llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h" |
17 | 15 | #include "llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h" |
@@ -781,18 +779,8 @@ Error LLJITBuilderState::prepareForConstruction() { |
781 | 779 |
|
782 | 780 | // If we need a process JITDylib but no setup function has been given then |
783 | 781 | // create a default one. |
784 | | - if (!SetupProcessSymbolsJITDylib && |
785 | | - (LinkProcessSymbolsByDefault || EnableDebuggerSupport)) { |
786 | | - |
787 | | - LLVM_DEBUG({ |
788 | | - dbgs() << "Creating default Process JD setup function (neeeded for"; |
789 | | - if (LinkProcessSymbolsByDefault) |
790 | | - dbgs() << " <link-process-syms-by-default>"; |
791 | | - if (EnableDebuggerSupport) |
792 | | - dbgs() << " <debugger-support>"; |
793 | | - dbgs() << ")\n"; |
794 | | - }); |
795 | | - |
| 782 | + if (!SetupProcessSymbolsJITDylib && LinkProcessSymbolsByDefault) { |
| 783 | + LLVM_DEBUG(dbgs() << "Creating default Process JD setup function\n"); |
796 | 784 | SetupProcessSymbolsJITDylib = [this](LLJIT &J) -> Expected<JITDylibSP> { |
797 | 785 | auto &JD = |
798 | 786 | J.getExecutionSession().createBareJITDylib("<Process Symbols>"); |
@@ -1014,46 +1002,6 @@ LLJIT::LLJIT(LLJITBuilderState &S, Error &Err) |
1014 | 1002 | } |
1015 | 1003 | } |
1016 | 1004 |
|
1017 | | - if (S.EnableDebuggerSupport) { |
1018 | | - if (auto *OLL = dyn_cast<ObjectLinkingLayer>(ObjLinkingLayer.get())) { |
1019 | | - switch (TT.getObjectFormat()) { |
1020 | | - case Triple::ELF: { |
1021 | | - auto Registrar = createJITLoaderGDBRegistrar(*ES); |
1022 | | - if (!Registrar) { |
1023 | | - Err = Registrar.takeError(); |
1024 | | - return; |
1025 | | - } |
1026 | | - OLL->addPlugin(std::make_unique<DebugObjectManagerPlugin>( |
1027 | | - *ES, std::move(*Registrar), true, true)); |
1028 | | - break; |
1029 | | - } |
1030 | | - case Triple::MachO: { |
1031 | | - assert(ProcessSymbols && "ProcessSymbols JD should be available when " |
1032 | | - "EnableDebuggerSupport is set"); |
1033 | | - auto DS = |
1034 | | - GDBJITDebugInfoRegistrationPlugin::Create(*ES, *ProcessSymbols, TT); |
1035 | | - if (!DS) { |
1036 | | - Err = DS.takeError(); |
1037 | | - return; |
1038 | | - } |
1039 | | - OLL->addPlugin(std::move(*DS)); |
1040 | | - break; |
1041 | | - } |
1042 | | - default: |
1043 | | - LLVM_DEBUG({ |
1044 | | - dbgs() << "Cannot enable LLJIT debugger support: " |
1045 | | - << Triple::getObjectFormatTypeName(TT.getObjectFormat()) |
1046 | | - << " not supported.\n"; |
1047 | | - }); |
1048 | | - } |
1049 | | - } else { |
1050 | | - LLVM_DEBUG({ |
1051 | | - dbgs() << "Cannot enable LLJIT debugger support: " |
1052 | | - " debugger support is only available when using JITLink.\n"; |
1053 | | - }); |
1054 | | - } |
1055 | | - } |
1056 | | - |
1057 | 1005 | if (S.PrePlatformSetup) { |
1058 | 1006 | if (auto Err2 = S.PrePlatformSetup(*this)) { |
1059 | 1007 | Err = std::move(Err2); |
|
0 commit comments