#include "qv4qobjectwrapper_p.h"
#include "qv4qmlextensions_p.h"
-#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
+#if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_MAC)
+#define HAVE_GNU_BACKTRACE
#include <execinfo.h>
#endif
engine = context->engine;
currentNativeFrame = 0;
-#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
+#if defined(HAVE_GNU_BACKTRACE)
UnwindHelper::prepareForUnwind(context);
nativeFrameCount = backtrace(&trace[0], sizeof(trace) / sizeof(trace[0]));
static bool showCode = !qgetenv("SHOW_CODE").isNull();
if (showCode) {
-#if OS(LINUX)
+#if OS(LINUX) && !defined(Q_OS_ANDROID)
char* disasmOutput = 0;
size_t disasmLength = 0;
FILE* disasmStream = open_memstream(&disasmOutput, &disasmLength);
vmFunc->codeRef = linkBuffer.finalizeCodeWithDisassembly("%s", name.data());
WTF::setDataFile(stderr);
-#if OS(LINUX) || OS(MAC_OS_X)
+#if (OS(LINUX) && !defined(Q_OS_ANDROID)) || OS(MAC_OS_X)
# if OS(MAC_OS_X)
char *disasmOutput = memStream.buf.data();
# endif
#include "qv4unwindhelper_p.h"
#include "qv4functionobject_p.h"
+#include "qv4function_p.h"
#include <wtf/Platform.h>
#include <QMap>
#if USE(LIBUNWIND_DEBUG)
#include <libunwind.h>
-#endif
#include <execinfo.h>
+#endif
namespace QV4 {