diff --git a/CQtDeployer/main.cpp b/CQtDeployer/main.cpp index 367e7e1..876007e 100644 --- a/CQtDeployer/main.cpp +++ b/CQtDeployer/main.cpp @@ -14,9 +14,28 @@ #include #include +#include +#include +#include + +void handler(int sig) { + void *array[10]; + size_t size; + + // get void*'s for all entries on the stack + size = backtrace(array, 10); + + // print out all the frames to stderr + fprintf(stderr, "Error: signal %d:\n", sig); + backtrace_symbols_fd(array, size, STDERR_FILENO); + exit(1); +} int main(int argc, const char *argv[]) { + signal(SIGSEGV, handler); // install our handler + + QCoreApplication::setOrganizationName("QuasarApp"); QCoreApplication::setOrganizationDomain("https://github.com/QuasarApp"); QCoreApplication::setApplicationName("CQtDeployer");