Fixes: 1) Building fails w/o "CONFIG += strace_win" 2) mingw build

Commenting Mingw release flags section for now. Strace is not reliable with mingw (only calls to other libraries are resolved, internal calls show up as addresses).
This commit is contained in:
Nick Tiskov
2013-01-25 22:52:12 +04:00
committed by sledgehammer999
parent ae2781b4c8
commit a2656670f7
2 changed files with 10 additions and 2 deletions

View File

@@ -152,9 +152,11 @@ void sigsegvHandler(int) {
std::cerr << "qBittorrent version: " << VERSION << std::endl; std::cerr << "qBittorrent version: " << VERSION << std::endl;
print_stacktrace(); print_stacktrace();
#else #else
#ifdef STACKTRACE_WIN
StraceDlg dlg; StraceDlg dlg;
dlg.setStacktraceString(straceWin::getBacktrace()); dlg.setStacktraceString(straceWin::getBacktrace());
dlg.exec(); dlg.exec();
#endif
#endif #endif
raise(SIGSEGV); raise(SIGSEGV);
} }
@@ -167,9 +169,11 @@ void sigabrtHandler(int) {
std::cerr << "qBittorrent version: " << VERSION << std::endl; std::cerr << "qBittorrent version: " << VERSION << std::endl;
print_stacktrace(); print_stacktrace();
#else #else
#ifdef STACKTRACE_WIN
StraceDlg dlg; StraceDlg dlg;
dlg.setStacktraceString(straceWin::getBacktrace()); dlg.setStacktraceString(straceWin::getBacktrace());
dlg.exec(); dlg.exec();
#endif
#endif #endif
raise(SIGABRT); raise(SIGABRT);
} }

View File

@@ -252,7 +252,10 @@ strace_win:win32:{
# Generate debug info in release builds # Generate debug info in release builds
release:{ release:{
win32-g++:QMAKE_CXXFLAGS_RELEASE += -g #win32-g++:{
# QMAKE_CXXFLAGS_RELEASE += -g
# QMAKE_LFLAGS_RELEASE -= -Wl,-s
#}
win32-msvc*:{ win32-msvc*:{
QMAKE_CXXFLAGS_RELEASE += -Zi QMAKE_CXXFLAGS_RELEASE += -Zi
QMAKE_LFLAGS += "/DEBUG" QMAKE_LFLAGS += "/DEBUG"
@@ -260,7 +263,8 @@ strace_win:win32:{
} }
DEFINES += STACKTRACE_WIN DEFINES += STACKTRACE_WIN
LIBS += dbghelp.lib win32-msvc*:LIBS += dbghelp.lib
win32-g++:LIBS += libdbghelp
FORMS += stacktrace_win_dlg.ui FORMS += stacktrace_win_dlg.ui
HEADERS += stacktrace_win.h \ HEADERS += stacktrace_win.h \