|
From: TSalm <TS...@fr...> - 2011-05-01 20:55:42
|
Le 01/05/2011 19:10, Jim Bell a écrit : > > On 1:59 PM, LRN wrote: >> On 01.05.2011 15:36, Earnie wrote: >>> TSalm wrote: >>>> Hi, >>>> >>>> Is there away to catch an exception and display his stacktrace ? >>>> >>> Look for DrMinGW and other JIT debuggers. >>> >> Also, http://code.google.com/p/backtrace-mingw/ > Cross-platform, C++: > <http://lists.boost.org/Archives/boost/2010/10/172303.php>. (But I > haven't tried it.) - I've try the "boost" one, but it seems it don't display any backtrace why MinGW. Too bad :-( - backtrace-mingw : - I first need libintl.lib (get it at http://sourceforge.net/projects/libintl-windows/ ) - I changed the makefile to this to compile successfully: .PHONY: all clean all : backtrace.dll test.exe backtrace.dll : backtrace.c mingw32-gcc -D_UNICODE -DUNICODE -O2 -shared -Wall D:\dev\libintl\win_iconv.o -o $@ $^ -LD:\dev\libintl -lbfd -lintl -liberty -limagehlp -luser32 -lshlwapi test.exe : test.c mingw32-g++ -g -Wall -o $@ $^ clean : -del -f backtrace.dll test.exe - And change test.c to throw logic_error exception. But no stacktrace is display - DrMingw : In the same way, their example with an access violation works well, but if a program throws an exception, it doen't show anything about this exception... Does a backtrace can't be obtain from exception ? Or did I miss some compilation switches ? ____________ Analyse antivirus effectuée par G Data AntiVirus |