Forced backtrace() function usage on iOS, 32-bit ARM architecture. Used macros from Boost predef.

This commit is contained in:
Ivan Ponomarev
2019-01-09 23:07:37 +03:00
parent 1b7956a40d
commit 411d92cbf3

View File

@@ -14,6 +14,13 @@
#include <boost/stacktrace/safe_dump_to.hpp>
// On iOS 32-bit ARM architecture _Unwind_Backtrace function doesn't exist, symbol is undefined.
// Forcing libc backtrace() function usage.
#include <boost/predef.h>
#if defined(BOOST_OS_IOS_AVAILABLE) && defined(BOOST_ARCH_ARM_AVAILABLE) && BOOST_VERSION_NUMBER_MAJOR(BOOST_ARCH_ARM) < 8
#define BOOST_STACKTRACE_USE_LIBC_BACKTRACE_FUNCTION
#endif
#if defined(BOOST_STACKTRACE_USE_LIBC_BACKTRACE_FUNCTION)
#include <execinfo.h>
#include <algorithm>