aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-10-10 20:53:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 01:05:57 +0200
commit76e795f818df09610b769346c402f1408f13131a (patch)
tree91bb48ea141839e302044a7e0c5e3f2cacff901d /src
parent36a5530cc9e04ed0ea381ebd1e2b1517eaa50a9f (diff)
Fix build on iOS
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>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4stacktrace.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4stacktrace.cpp b/src/qml/jsruntime/qv4stacktrace.cpp
index 7b7060d4c6..905111a23e 100644
--- a/src/qml/jsruntime/qv4stacktrace.cpp
+++ b/src/qml/jsruntime/qv4stacktrace.cpp
@@ -49,7 +49,11 @@
#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
@@ -95,7 +99,7 @@ NativeStackTrace::NativeStackTrace(ExecutionContext *context)
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]));