On 32-bit ARM, iOS uses SJLJ for exceptions, which is probably why
_Unwind_Backtrace is not available (it's hard to implement reliably without
unwind tables). Don't use it there, we don't need it (because we can't JIT).
Task-Number: QTBUG-33979
Change-Id: Ifafbb59a32fd23c9b2e93228779535b2324ac4a3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
#include "qv4engine_p.h"
#include "qv4unwindhelper_p.h"
-#if defined(V4_CXX_ABI_EXCEPTION) || defined(Q_OS_DARWIN)
+#if defined(V4_CXX_ABI_EXCEPTION) || (defined(Q_OS_DARWIN) && !defined(Q_PROCESSOR_ARM_32))
+#define USE_UNWIND_BACKTRACE
+#endif
+
+#if defined(USE_UNWIND_BACKTRACE)
#include <unwind.h>
struct BacktraceHelper
engine = context->engine;
currentNativeFrame = 0;
-#if defined(V4_CXX_ABI_EXCEPTION) || defined(Q_OS_DARWIN)
+#if defined(USE_UNWIND_BACKTRACE)
UnwindHelper::prepareForUnwind(context);
nativeFrameCount = get_backtrace_from_libunwind(&trace[0], sizeof(trace) / sizeof(trace[0]));