[PATCH] Don't reference main() in stacktrace.cc on MinGW

Aaron W. LaFramboise aaronavay62@aaronwl.com
Thu Aug 21 12:16:00 GMT 2008


The generic i386 fall-back unwinder has logic to stop early at main(). 
However, on Windows, main() isn't always available, primarily when we're 
in a shared library (DLL).  Also, when libgcj is linked as a DLL (patch 
coming soon), the 'main' symbol doesn't have the proper dynamic linkage 
to get the one we want, so things won't work.

This patch fixes this issue by removing this stopping condition on Windows.

I tested this by building a static libjava on i386-pc-mingw32.

OK to commit?



More information about the Gcc-patches mailing list