14#define DEBUG_TYPE "orc"
24 return make_error<StringError>(
"Cannot enable LLJIT debugger support: "
25 "Debugger support requires JITLink",
29 return make_error<StringError>(
"Cannot enable LLJIT debugger support: "
30 "Process symbols are not available",
36 switch (TT.getObjectFormat()) {
40 return Registrar.takeError();
41 ObjLinkingLayer->addPlugin(std::make_unique<DebugObjectManagerPlugin>(
42 ES, std::move(*Registrar),
false,
true));
48 return DS.takeError();
49 ObjLinkingLayer->addPlugin(std::move(*DS));
53 return make_error<StringError>(
54 "Cannot enable LLJIT debugger support: " +
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
static StringRef getObjectFormatTypeName(ObjectFormatType ObjectFormat)
Get the name for the Object format.
static Expected< std::unique_ptr< GDBJITDebugInfoRegistrationPlugin > > Create(ExecutionSession &ES, JITDylib &ProcessJD, const Triple &TT)
A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT.
ObjectLayer & getObjLinkingLayer()
Returns a reference to the ObjLinkingLayer.
const Triple & getTargetTriple() const
Returns a reference to the triple for this instance.
JITDylibSP getProcessSymbolsJITDylib()
Returns the ProcessSymbols JITDylib, which by default reflects non-JIT'd symbols in the host process.
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this instance.
Error enableDebuggerSupport(LLJIT &J)
Expected< std::unique_ptr< EPCDebugObjectRegistrar > > createJITLoaderGDBRegistrar(ExecutionSession &ES, std::optional< ExecutorAddr > RegistrationFunctionDylib=std::nullopt)
Create a ExecutorProcessControl-based DebugObjectRegistrar that emits debug objects to the GDB JIT in...
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...