lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 30/09/2011 3.28, Dimiter 'malkia' Stanev wrote:
There seems to be new exception handling SJLJ (setjmp, longjmp), but the
old dwarf2 (dw2) exception handling is there (but only for 32-bit)


For what I understand from the README-gcc-tdm.txt in the installation setjump/longjump is the classic way, whereas dwarf2 is new:

"*** DW2 vs. SJLJ unwinding ***

GCC currently supports two methods of stack frame unwinding: Dwarf-2 (DW2) or
SJLJ (setjmp/longjmp). Until recently, only SJLJ has been available for the
Windows platform. This affects you, the end user, primarily in programs that
throw and catch exceptions. Programs which utilize the DW2 unwind method
generally execute more quickly than programs which utilize the SJLJ method,
because the DW2 method incurs no runtime overhead until an exception is thrown.
However, the DW2 method does incur a size penalty on code that must handle
exceptions, and more importantly the DW2 method cannot yet unwind (pass
exceptions) through "foreign" stack frames: stack frames compiled by another
non-DW2-enabled compiler, such as OS DLLs in a Windows callback.

This means that you should in general choose the SJLJ version of the TDM-GCC
builds unless you know you need faster exception-aware programs and can be
certain you will never throw an exception through a foreign stack area.
[...]
"

BTW, setjump/longjump are C library (C89) facilities IIRC, so they should be well supported.



[...]
On this page - you can see SJLJ version and DW2 version (32-bit only)

http://tdm-gcc.tdragon.net/download

I myself have given up on mingw, and I'm staying with Windows WDK for
now - it's a bit behind certain C++ things, but only two libraries so
far I've been using are C++ and was able to patch them. This way I can
run on systems since Windows 2000 - both 32-bit and 64-bit.


I did give up on mingw way ago too, until I found the tdm "distro" (~3yrs ago). It has always worked more or less flawlessly (on my WinXP 32 bit machine). I admit I never did super-advanced things, but it always compiled Lua with no fuss and also compiling SciTE was painless. This is the first big issue I find, but I'm no C/C++ guru so YMMV.

Now it comes to my mind: could it be that gcc 4.6.1 is a beta? I remember something about *NIX things having a convention about odd revision numbers being betas - I always hated that convention - not sure if gcc follows that pattern. Anyway on the TDM site there is no mention about it. Maybe I should wait until 4.6.2?



-- Lorenzo