Dear all,
I copied some code from here
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33903#c5 and removed those dl*
stuffs and tested it. But this piece of code only works on my linux.
I got this result with mingw-w64-gcc x86 version:
E:\Desktop>g++ -v
Thread model: win32
gcc version 4.9.0 20140218 (experimental) (i686-win32-sjlj, Built by
MinGW-W64 project)
E:\Desktop>g++ test.cpp -O0 -g -Wl,--wrap,__cxa_throw
E:\Desktop>gdb a
(gdb) r
Starting program: E:\Desktop\a.exe
[New Thread 3132.0x1ea4]
ping!
00000002
Program received signal SIGSEGV, Segmentation fault.
0x6ced3226 in libgcc_s_sjlj-1!_Unwind_GetIP () from
e:\mingw\mingw32\opt\bin\libgcc_s_sjlj-1.dll
(gdb) bt
#0 0x6ced3226 in libgcc_s_sjlj-1!_Unwind_GetIP () from
e:\mingw\mingw32\opt\bin\libgcc_s_sjlj-1.dll
#1 0x00401581 in helper (ctx=0x28fdcc) at test.cpp:7
#2 0x6ced3614 in libgcc_s_sjlj-1!_Unwind_Backtrace () from
e:\mingw\mingw32\opt\bin\libgcc_s_sjlj-1.dll
(gdb)
And this result with x64 version:
E:\Desktop>g++ -v
Thread model: win32
gcc version 4.9.0 20140218 (experimental) (x86_64-win32-seh, Built by
MinGW-W64 project)
E:\Desktop>g++ test.cpp -O0 -g -Wl,--wrap,__cxa_throw
E:\Desktop>gdb a
(gdb) r
Starting program: E:\Desktop\a.exe
[New Thread 8080.0x1f88]
ping!
pong!
[Inferior 1 (process 8080) exited normally]
(gdb)
Any suggestions?
--------------
Best regards,
lh_mouse
2014-04-25
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public