diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 6d394ab9f853b7ea75fab469530478e54d8ec9ed..f0b0279b825d9bb9dbdb0bd67f3899b4f8fd5c53 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -104,6 +104,15 @@ static int &currentToken()
     return token;
 }
 
+#define execCommand(command,callback) \
+    execCommandInternal(command, NoFlags, &GdbEngine::callback, STRINGIFY(callback), QVariant())
+#define execCommandF(command,callback,flags) \
+    execCommandInternal(command, flags, &GdbEngine::callback, STRINGIFY(callback), QVariant())
+#define execCommandC(command,callback,cookie) \
+    execCommandInternal(command, NoFlags, &GdbEngine::callback, STRINGIFY(callback), cookie)
+#define execCommandFC(command,callback,flags,cookie) \
+    execCommandInternal(command, flags, &GdbEngine::callback, STRINGIFY(callback), cookie)
+
 ///////////////////////////////////////////////////////////////////////
 //
 // GdbEngine
diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h
index 6c3df5dd2fc6ac40c4705fa6173397308f9e8cce..84b161685f0c5a07f3016d9a2d180c6214fb99b3 100644
--- a/src/plugins/debugger/gdbengine.h
+++ b/src/plugins/debugger/gdbengine.h
@@ -176,14 +176,6 @@ private:
     void execCommandInternal(const QString &command, GdbCommandFlags flags,
                              GdbCommandCallback callback, const char *callbackName,
                              const QVariant &cookie);
-    #define execCommand(command,callback) \
-        execCommandInternal(command, NoFlags, &GdbEngine::callback, STRINGIFY(callback), QVariant())
-    #define execCommandF(command,callback,flags) \
-        execCommandInternal(command, flags, &GdbEngine::callback, STRINGIFY(callback), QVariant())
-    #define execCommandC(command,callback,cookie) \
-        execCommandInternal(command, NoFlags, &GdbEngine::callback, STRINGIFY(callback), cookie)
-    #define execCommandFC(command,callback,flags,cookie) \
-        execCommandInternal(command, flags, &GdbEngine::callback, STRINGIFY(callback), cookie)
     void sendCommand(const QString &command, GdbCommandFlags flags = NoFlags);
 
     void setTokenBarrier();