Hi Kenneth,> Is there anything in the current codebase that maps an "unwind" > instruction to a DWARF unnwinder? Seeing as how (I think) the DWARF > info is already compiled in, this would be a useful thing.in llvm from svn an "unwind" instruction is mapped to a call to _Unwind_Resume. This is no good for throwing a new dwarf exception, but it does mean that you can now implement cleanups as: invoke XYZ to label %normal unwind label %cleanup cleanup: do_stuff unwind Ciao, Duncan.
Sweet! That is exactly what I've been looking for. I guess it's going in the 2.6 release then? And __cxa_throw will still throw a DWARF exception with the landing pads and the exception object selection and all that jazz? On Mon, Jul 20, 2009 at 12:12 PM, Duncan Sands<baldrick at free.fr> wrote:> Hi Kenneth, > >> Is there anything in the current codebase that maps an "unwind" >> instruction to a DWARF unnwinder? Seeing as how (I think) the DWARF >> info is already compiled in, this would be a useful thing. > > in llvm from svn an "unwind" instruction is mapped to a call to > _Unwind_Resume. This is no good for throwing a new dwarf exception, > but it does mean that you can now implement cleanups as: > > invoke XYZ to label %normal unwind label %cleanup > cleanup: > do_stuff > unwind > > Ciao, > > Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Kenneth Uildriks wrote:> Sweet! That is exactly what I've been looking for. I guess it's > going in the 2.6 release then?Yes. You still need to call __cxa_throw (or equivalent) to throw a new exception, but you can now use unwind to rethrow an exception from the unwind block of an invoke. That said, I don't think anyone is making use of it - probably no-one except me even knows about it :)> And __cxa_throw will still throw a DWARF exception with the landing > pads and the exception object selection and all that jazz?The __cxa_throw code is part of the gcc library and outside the control of the LLVM project, so it works the same as before. Ciao, Duncan.