[LLVMdev] unwind/invoke design

Duncan Sands baldrick at free.fr
Mon Jun 15 12:40:30 PDT 2009

Hi Wesley,

> The documentation of unwind/invoke is quite clear and does exactly
> what I need: unwinding the stack. I don't need it to carry an object
> back. I don't need it to figure out what the type of the object is or
> what catch() blocks it matches. I just need it to unwind the stack.
> The rest is my job as a part of the runtime. Unfortunately, I have
> learned that while this works with the bytecode evaluator, it doesn't
> work with the JIT or native codegen [1].

you can call the libgcc/libunwind routines directly.  There was an
example of this on the mailing list by Talin not long ago.  That said,
it wouldn't be too hard to support "unwind" in the code generators.
It would basically mean creating thread-local storage to hold dwarf
exception information, and turning "unwind" into some code to set up
the info and call the appropriate libgcc routine.  Unfortunately no-one
was interested enough to do it yet.



More information about the llvm-dev mailing list