From a6037c38501a8307bd39def86d142dfe655728af Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Mon, 8 Feb 2010 14:06:00 +0100
Subject: [PATCH] Debugger: Compile on Windows.

---
 src/plugins/debugger/gdb/classicgdbengine.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp
index 1f76bb6a1ee..c2cbcba6e2f 100644
--- a/src/plugins/debugger/gdb/classicgdbengine.cpp
+++ b/src/plugins/debugger/gdb/classicgdbengine.cpp
@@ -518,20 +518,21 @@ void GdbEngine::tryLoadDebuggingHelpersClassic()
     else
         dlopenLib = manager()->qtDumperLibraryName().toLocal8Bit();
 
-    // Do not use STRINGIFY as we really want to expand that to a number.
-    const QByteArray flag = QByteArray::number(RTLD_NOW);
+    // Do not use STRINGIFY for RTLD_NOW as we really want to expand that to a number.
 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
     // We are using Python on Windows and Symbian.
     QTC_ASSERT(false, /**/);
 #elif defined(Q_OS_MAC)
     //postCommand("sharedlibrary libc"); // for malloc
     //postCommand("sharedlibrary libdl"); // for dlopen
+    const QByteArray flag = QByteArray::number(RTLD_NOW);
     postCommand("call (void)dlopen(\"" + GdbMi::escapeCString(dlopenLib)
                 + "\", " + flag + ")",
         CB(handleDebuggingHelperSetup));
     //postCommand("sharedlibrary " + dotEscape(dlopenLib));
 #else
     //postCommand("p dlopen");
+    const QByteArray flag = QByteArray::number(RTLD_NOW);
     postCommand("sharedlibrary libc"); // for malloc
     postCommand("sharedlibrary libdl"); // for dlopen
     postCommand("call (void*)dlopen(\"" + GdbMi::escapeCString(dlopenLib)
-- 
GitLab