Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / jitloader_gdb / main.c
blob6a8ec50e6637e2614a45ca9e2e8feba4e7011fd2
1 #include <inttypes.h>
3 // GDB JIT interface
4 enum JITAction { JIT_NOACTION, JIT_REGISTER_FN, JIT_UNREGISTER_FN };
6 struct JITCodeEntry
8 struct JITCodeEntry* next;
9 struct JITCodeEntry* prev;
10 const char *symfile_addr;
11 uint64_t symfile_size;
14 struct JITDescriptor
16 uint32_t version;
17 uint32_t action_flag;
18 struct JITCodeEntry* relevant_entry;
19 struct JITCodeEntry* first_entry;
22 struct JITDescriptor __jit_debug_descriptor = { 1, JIT_NOACTION, 0, 0 };
24 void __jit_debug_register_code()
27 // end GDB JIT interface
29 struct JITCodeEntry entry;
31 int main()
33 // Create a code entry with a bogus size
34 entry.next = entry.prev = 0;
35 entry.symfile_addr = (char *)&entry;
36 entry.symfile_size = (uint64_t)47<<32;
38 __jit_debug_descriptor.relevant_entry = __jit_debug_descriptor.first_entry = &entry;
39 __jit_debug_descriptor.action_flag = JIT_REGISTER_FN;
41 __jit_debug_register_code();
43 return 0;