On Tue, Apr 20, 2010 at 11:45 AM, leon zadorin <[email protected]> wrote:
> On 4/20/10, leon zadorin <[email protected]> wrote:
>
>> there is anyone out there who is using mingw64 to build native W7
>> (pro) 64 bit simple (e.g. single-threaded) C++ applications which
>> throw exceptions and have them unwind using dwarf2 (i.e.
>> --disable-sjlj-exceptions)? Has it been done?
>
> Minor update -- I have just verified (on 4.4.3) that using
> slower/less-efficient (at least w.r.t. non-thrown exceptions)
> prologue/epilogue exception handling (i.e. omitting the
> --disable-sjlj-exceptions) fixes the issue -- the app catches the
> exception.
>
> I would like to know if there is any way to use dwarf2 eh though... my
> understanding is that they are more efficient/faster for cases when
> exceptions are not throw (which, by the very definition of an
> exception, should occur the vast majority of times)...
AFAIK, dwarf2 for w64 is verboten at the moment, not
yet implemented properly. (Kai may have more to say on
the matter.) It is a bug in the 4.4.x configury that
it actually allows such a thing for x86_64-*-mingw32.
>
> kind regards
> Leon.
>
--
Ozkan
>> The C++ code which fails to catch is as follows:
>>
>> #include <iostream>
>> #include <stdexcept>
>>
>> int
>> main()
>> {
>> try {
>> ::std::cout << "about to throw\n";
>> throw ::std::runtime_error("boo");
>> } catch (::std::exception const & e) {
>> ::std::cout << "wam\n";
>> } catch (...) {
>> ::std::cout << "bam\n";
>> }
>>
>> return 0;
>> }
>>
>> the above is compiled as:
>> c++ -static main.cc
>>
>> the gcc was configured as:
>>
>> Target: x86_64-w64-mingw32
>> configure options:
>> --disable-threads --enable-languages=c++ --disable-sjlj-exceptions
>> --disable-libgomp --disable-nls --with-system-zlib --disable-libgcj
>> --target=x86_64-w64-mingw32 --disable-multilib
>>
>> Thread model: single
>> gcc version 4.4.3 (GCC) (but was also reproduced with 4.4.2)
>>
>> the collect/linking order is as follows:
>> collect2 -Bstatic crt2.o crtbegin.o /var/tmp//ccDhsQqG.o -lstdc++
>> -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32
>> -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname
>> -lmingwex -lmsvcrt crtend.o
>>
>>
>> The W7 reports that app has asked the runtime environment to terminate
>> it in the unusual way (I presume it to be the usual thing it spits out
>> when terminate/abort/etc is done by the app).
>>
>> Any thoughts would be appreciated.
>>
>> Kind regards
>> Leon.
>>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public