[PATCH] D142176: [libunwind] On Darwin, add a callback-based lookup scheme for JIT'd unwind info.
Vassil Vassilev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 05:27:44 PST 2023
v.g.vassilev added a comment.
In D142176#4075822 <https://reviews.llvm.org/D142176#4075822>, @lhames wrote:
> Here's a potential testcase, for anyone who wants to try this out. You'll need to build LLVM, compiler-rt, and libunwind:
>
> C++ source for testcase:
>
> int main(int argc, char *argv[]) {
> try {
> throw 42;
> } catch (int X) {
> return X;
> }
> return 0;
> }
>
> This can be compiled and run under the `llvm-jitlink` test tool on Darwin with:
>
> % clang++ -c -o eh.o eh.cpp
> % DYLD_LIBRARY_PATH=/path/to/llvm-build/lib ORC_RT_DEBUG=1 llvm-jitlink -orc-runtime=/path/to/llvm-build/lib/clang/16/lib/darwin/liborc_rt_osx.a eh.o
> __unw_add/remove_find_dynamic_unwind_sections available. Using callback-based frame info lookup.
> ...
>
> You can verify that the exception was caught and handled correctly by printing the return code:
>
> % echo $?
> 42
I was wondering if it is feasible to add a regression test in `clang-repl`, possibly now with the right callback?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142176/new/
https://reviews.llvm.org/D142176
More information about the llvm-commits
mailing list