Commit 673b16fd authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Catching of SIGSEGV can now be controlled through CMake flag.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20286 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f64c444c
......@@ -126,6 +126,12 @@ if (WIN32)
-DUSEACG )
endif ()
set ( CATCH_SIGSEGV True CACHE BOOL "Whether SIGSEGV should be catched. Set this to false in order to get a core dump with usable call stack. Set to true in order to get a stack trace at the time of crash." )
if (NOT CATCH_SIGSEGV)
add_definitions( -DNO_CATCH_SIGSEGV )
endif()
# ====================================================================================
# Get list of ll plugin dependencies and handle special ones
# where we need to link the library directly into the core to prevent
......
......@@ -369,11 +369,10 @@ int main(int argc, char **argv)
CSimpleOpt args(argc, argv, g_rgOptions);
// Only Install signal handler if not running in debug version, otherwise gdb will get confused
// #ifndef DEBUG
#ifndef NO_CATCH_SIGSEGV
// Set a handler for segfaults
std::signal(SIGSEGV, segfaultHandling);
// #endif
#endif
OpenFlipper::Options::windowTitle(TOSTRING(PRODUCT_STRING)" v" + OpenFlipper::Options::coreVersion());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment