Duncan Sands wrote:>> I can't find any information about cxa_throw at all, not even a type >> signature. If I could, could I just call it as if it were unwind, and it >> would be caught by invoke? >> > > cxa_throw comes from the gcc C++ runtime. In order to see how to throw > and catch things correctly using it, compile some C++ examples down to > bitcode using llvm-g++. >So what about those of us who are implementing frontends that have no connection with gcc or the c++ runtime at all? Are we out of luck as far as unwind is concerned? -- Talin
Talin wrote:> > > So what about those of us who are implementing frontends that have no > connection with gcc or the c++ runtime at all? Are we out of luck as far > as unwind is concerned? > >Yes you are :) Currently, if you want exceptions using the JIT or static compilation, you need the libgcc runtime (or an equivalent implementation of an unwinding runtime). Or you can use the interpreter, which works with invoke/unwind. Cheers, Nicolas> -- Talin > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
> So what about those of us who are implementing frontends that have no > connection with gcc or the c++ runtime at all? Are we out of luck as far > as unwind is concerned?For the moment, yes. If unwind gets implemented one day (I have a plan, but no time right now), the implementation is sure to call routines in the gcc runtime. Ciao, Duncan.
On Mon, Sep 29, 2008 at 1:50 AM, Duncan Sands <baldrick at free.fr> wrote:> /* snip */Just for another voice in here. 'unwind' and its kin would also be useful for me, especially since this is on platforms without GCC (nor is GCC used in any way in any step anywhere). Why does it generate GCC only constructs anyway, that does not sound very much like the multi-platform that LLVM is targeting.
On Mon, 2008-09-29 at 09:50 +0200, Duncan Sands wrote:> For the moment, yes. If unwind gets implemented one day (I have a plan, > but no time right now), the implementation is sure to call routines in > the gcc runtime.As a transient solution that makes sense, but it seems desirable to have a generalized unwind scheme that is not tied to libgcc. shap