LLVM: lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
10
13
14#include
15#include
16
17#define DEBUG_TYPE "orc"
18
19
21
22extern "C" {
23
24
25
26
29
30
31
34
35
36#if !defined(_MSC_VER)
37 asm volatile("" ::: "memory");
38#endif
39}
40}
41
42using namespace llvm;
44
45
48 dbgs() << "Adding debug object to GDB JIT interface "
49 << formatv("([{0:x16} -- {1:x16}])",
50 reinterpret_cast<uintptr_t>(ObjAddr),
51 reinterpret_cast<uintptr_t>(ObjAddr + Size))
52 << "\n";
53 });
54
56 E->symfile_addr = ObjAddr;
58 E->prev_entry = nullptr;
59
60
61 static std::mutex JITDebugLock;
62 std::lock_guardstd::mutex Lock(JITDebugLock);
63
64
66 E->next_entry = NextEntry;
67 if (NextEntry) {
69 }
70
74}
75
79 return WrapperFunction<SPSError(SPSExecutorAddrRange, bool)>::handle(
80 ArgData, ArgSize,
83 R.size());
84
85 if (AutoRegisterCode)
88 })
90}
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ATTRIBUTE_NOINLINE
LLVM_ATTRIBUTE_NOINLINE - On compilers where we have a directive to do so, mark a method "not for inl...
#define LLVM_ALWAYS_EXPORT
struct jit_descriptor __jit_debug_descriptor
Definition JITLoaderGDB.cpp:27
orc::shared::CWrapperFunctionResult llvm_orc_registerJITLoaderGDBAllocAction(const char *ArgData, size_t ArgSize)
Definition JITLoaderGDB.cpp:77
static void appendJITDebugDescriptor(const char *ObjAddr, size_t Size)
Definition JITLoaderGDB.cpp:46
LLVM_ABI LLVM_ALWAYS_EXPORT LLVM_ATTRIBUTE_NOINLINE void __jit_debug_register_code()
Definition JITLoaderGDB.cpp:33
static constexpr uint32_t JitDescriptorVersion
Definition JITLoaderGDB.cpp:20
static ErrorSuccess success()
Create a success value.
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
struct jit_code_entry * prev_entry
Represents an address range in the exceutor process.