diff options
-rw-r--r-- | applications/kube/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/applications/kube/main.cpp b/applications/kube/main.cpp index ef88500e..464a17af 100644 --- a/applications/kube/main.cpp +++ b/applications/kube/main.cpp | |||
@@ -18,17 +18,23 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <signal.h> | 20 | #include <signal.h> |
21 | #include <execinfo.h> | ||
22 | #include <csignal> | 21 | #include <csignal> |
23 | #include <iostream> | 22 | #include <iostream> |
24 | #include <cstdlib> | 23 | #include <cstdlib> |
25 | #include <cxxabi.h> | ||
26 | #include <dlfcn.h> | 24 | #include <dlfcn.h> |
27 | #include <ostream> | 25 | #include <ostream> |
28 | #include <sstream> | 26 | #include <sstream> |
29 | #include <thread> | 27 | #include <thread> |
30 | #include <chrono> | 28 | #include <chrono> |
29 | #ifndef Q_OS_WIN | ||
30 | #include <execinfo.h> | ||
31 | #include <unistd.h> | 31 | #include <unistd.h> |
32 | #include <cxxabi.h> | ||
33 | #include <dlfcn.h> | ||
34 | #else | ||
35 | #include <io.h> | ||
36 | #include <process.h> | ||
37 | #endif | ||
32 | 38 | ||
33 | #include <QApplication> | 39 | #include <QApplication> |
34 | #include <QQmlApplicationEngine> | 40 | #include <QQmlApplicationEngine> |
@@ -50,6 +56,7 @@ | |||
50 | //Print a demangled stacktrace | 56 | //Print a demangled stacktrace |
51 | void printStacktrace() | 57 | void printStacktrace() |
52 | { | 58 | { |
59 | #ifndef Q_OS_WIN | ||
53 | int skip = 1; | 60 | int skip = 1; |
54 | void *callstack[128]; | 61 | void *callstack[128]; |
55 | const int nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); | 62 | const int nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); |
@@ -84,6 +91,7 @@ void printStacktrace() | |||
84 | trace_buf << "[truncated]\n"; | 91 | trace_buf << "[truncated]\n"; |
85 | } | 92 | } |
86 | std::cerr << trace_buf.str(); | 93 | std::cerr << trace_buf.str(); |
94 | #endif | ||
87 | } | 95 | } |
88 | 96 | ||
89 | static int sCounter = 0; | 97 | static int sCounter = 0; |