Fix exception handling with MinGW on ia32
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 11 Jul 2013 10:45:31 +0000 (12:45 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 12 Jul 2013 10:37:24 +0000 (12:37 +0200)
MinGW on ia32 uses dwarf2 tables and provides __register_frame, so let's use that.

Change-Id: If68598686ff03c8d3d6b1e0db13b477b469adb71
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
src/qml/qml/v4/qv4unwindhelper.cpp
src/qml/qml/v4/qv4unwindhelper_p-dw2.h

index af7f352..beb5132 100644 (file)
@@ -45,7 +45,7 @@
 
 #if CPU(X86_64) && (OS(LINUX) || OS(MAC_OS_X))
 #  define USE_DW2_HELPER
-#elif CPU(X86) && OS(LINUX)
+#elif CPU(X86) && COMPILER(GCC)
 #  define USE_DW2_HELPER
 #elif CPU(ARM) && (OS(LINUX) || OS(QNX))
 # define USE_ARM_HELPER
index 1abcfba..57615f0 100644 (file)
@@ -52,9 +52,6 @@
 #include <QMap>
 #include <QMutex>
 
-#define __USE_GNU
-#include <dlfcn.h>
-
 QT_BEGIN_NAMESPACE
 
 namespace QV4 {
@@ -75,7 +72,7 @@ static const unsigned char cie_fde_data[] = {
 static const int fde_offset = 20;
 static const int initial_location_offset = 28;
 static const int address_range_offset = 36;
-#elif CPU(X86) && OS(LINUX)
+#elif CPU(X86)
 static const unsigned char cie_fde_data[] = {
     0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
     0x1, 0x0, 0x4, 0x7c, 0x8, 0xc, 0x4, 0x4,