diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 2bb78ac5b..f7e7c835d 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -46,6 +46,10 @@ #include "util/RsGxsUpdateBroadcast.h" #include "gui/settings/WebuiPage.h" +#ifdef SIGFPE_DEBUG +#include +#endif + #if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0) #ifdef WINDOWS_SYS #include @@ -155,6 +159,9 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); QDir::setCurrent(QCoreApplication::applicationDirPath()); } +#endif +#ifdef SIGFPE_DEBUG +feenableexcept(FE_INVALID | FE_DIVBYZERO); #endif QStringList args = char_array_to_stringlist(argv+1, argc-1); diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 6b9d3c968..e617922ad 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -12,6 +12,7 @@ DEFINES += TARGET=\\\"$TARGET\\\" # #CONFIG += unfinished #CONFIG += debug +#DEFINES *= SIGFPE_DEBUG #QMAKE_CFLAGS += -fmudflap #LIBS *= /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflap.a /usr/lib/gcc/x86_64-linux-gnu/4.4/libmudflapth.a