[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
Wed May 8 10:34:45 PDT 2019
sgraenitz marked 3 inline comments as done.
sgraenitz added a comment.
Thanks for your reply and thoughts about that.
> I'd strongly encourage you to try to come up with a testing strategy here.
Yes, I just added a simple lit test. What do you think?
I ran it in isolation on macOS (`UNSUPPORTED`) and on Ubuntu 18.04 (`PASS`) using:
$ cd path/to/llvm-build
$ ninja FileCheck llvm-config lli clang lldb
$ python bin/llvm-lit -v /path/to/llvm-project/lldb/lit/Breakpoint/jitbp_elf.test
================
Comment at: lldb/lit/Breakpoint/Inputs/jitbp.cpp:2
+int jitbp() { return 0; }
+int main() { return jitbp(); }
----------------
lli already has a `main()` and so we have `jitbp()` here to set the breakpoint on.
================
Comment at: lldb/lit/Breakpoint/jitbp_elf.test:1
+# REQUIRES: target-x86_64, system-linux, native
+
----------------
The test only works with ELF on Linux. Is the `REQUIRES` sufficient?
================
Comment at: lldb/lit/Breakpoint/jitbp_elf.test:3
+
+# RUN: %clang -g -S -emit-llvm -o %t.ll %p/Inputs/jitbp.cpp
+# RUN: %lldb -b -o 'b jitbp' -o 'run -jit-kind=mcjit %t.ll' lli | FileCheck %s
----------------
With these args, clang shouldn't optimize away `jitbp()`
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