LLVM: lib/ExecutionEngine/Orc/Debugging/DebuggerSupport.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

13

14#define DEBUG_TYPE "orc"

15

16using namespace llvm;

18

20

23 if (!ObjLinkingLayer)

25 "Debugger support requires JITLink",

28 if (!ProcessSymsJD)

30 "Process symbols are not available",

32

35

36 switch (TT.getObjectFormat()) {

39 ObjLinkingLayer->addPlugin(

40 std::make_unique(ES, false, true, TargetSymErr));

41 return TargetSymErr;

42 }

45 if (!DS)

46 return DS.takeError();

47 ObjLinkingLayer->addPlugin(std::move(*DS));

49 }

50 default:

52 "Cannot enable LLJIT debugger support: " +

54 " is not supported",

56 }

57}

58

59}

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

static LLVM_ABI 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.

LLVM_ABI Error enableDebuggerSupport(LLJIT &J)

Definition DebuggerSupport.cpp:21

This is an optimization pass for GlobalISel generic memory operations.

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

LLVM_ABI std::error_code inconvertibleErrorCode()

The value returned by this function can be returned from convertToErrorCode for Error values where no...

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.