2018-04-22 15:05:46 +02:00
|
|
|
--- src/App/Application.cpp 2018-04-06 10:48:37.000000000 +0200
|
|
|
|
+++ src/App/Application.cpp 2018-04-22 15:04:11.876136151 +0200
|
2018-04-19 11:15:37 +02:00
|
|
|
@@ -1063,7 +1063,9 @@
|
2018-04-22 15:05:46 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(FC_OS_LINUX)
|
|
|
|
+#ifdef __GLIBC__
|
|
|
|
#include <execinfo.h>
|
|
|
|
+#endif
|
|
|
|
#include <dlfcn.h>
|
|
|
|
#include <cxxabi.h>
|
|
|
|
|
2018-04-19 11:15:37 +02:00
|
|
|
@@ -1075,6 +1077,7 @@
|
2018-04-22 15:05:46 +02:00
|
|
|
// This function produces a stack backtrace with demangled function & method names.
|
|
|
|
void printBacktrace(size_t skip=0)
|
|
|
|
{
|
|
|
|
+#ifdef __GLIBC__
|
|
|
|
void *callstack[128];
|
|
|
|
size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);
|
|
|
|
size_t nFrames = backtrace(callstack, nMaxFrames);
|
2018-04-19 11:15:37 +02:00
|
|
|
@@ -1105,6 +1108,9 @@
|
2018-04-22 15:05:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
free(symbols);
|
|
|
|
+#else
|
|
|
|
+ std::cerr << "sorry, no backtrace on musl libc";
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|