[Lldb-commits] [PATCH] D61611: [JITLoaderGDB] Set eTypeJIT for objects read from JIT descriptors
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 08:18:56 PDT 2019
sgraenitz marked 3 inline comments as done.
sgraenitz added inline comments.
================
Comment at: lldb/lit/Breakpoint/jitbp_elf.test:1
+# REQUIRES: target-x86_64, system-linux, native
+
----------------
labath wrote:
> sgraenitz wrote:
> > labath wrote:
> > > sgraenitz wrote:
> > > > The test only works with ELF on Linux. Is the `REQUIRES` sufficient?
> > > Yes, but what is the reason for that? It looks like the test is generic enough that it should run on any system where lli is able to jit code. In particular I'd expect this to also work on macOS if you set `plugin-jit-loader.gdb.enable` to `on`.
> > Indeed, since https://reviews.llvm.org/D57689 it does work on macOS with ELF.
> Cool. I think you can also drop the `target-x86_64` part, as I don't see a reason why this shouldn't work on arm for instance (though we don't have any arm bots around to verify that). I am not sure why you're using the `--target` argument to clang -- I think you should be able to just drop that and make clang generate IR for the host. (the `native` feature ensures that "host" is the default target for clang).
Without `--target` we emit MachO, which is not implemented on the JIT side and LLDB doesn't even get a JIT descriptor:
```
$ bin/lldb
(lldb) target create bin/lli
Current executable set to 'bin/lli' (x86_64).
(lldb) b getObjectForDebug
Breakpoint 1: 3 locations.
(lldb) run -jit-kind=mcjit tools/lldb/lit/Breakpoint/Output/jitbp_elf.test.tmp.ll
Process 40151 launched: /path/to/llvm-build/bin/lli' (x86_64)
Process 40151 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.3
frame #0: 0x0000000100f3ddb3 lli`(anonymous namespace)::LoadedMachOObjectInfo::getObjectForDebug(this=0x0000000105c03540, Obj=0x0000000105c03880) const at RuntimeDyldMachO.cpp:38:12
35
36 OwningBinary<ObjectFile>
37 getObjectForDebug(const ObjectFile &Obj) const override {
-> 38 return OwningBinary<ObjectFile>();
39 }
40 };
41
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61611/new/
https://reviews.llvm.org/D61611
More information about the lldb-commits
mailing list