diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp index 94809204e91342d02f5f2341695e4b35020c2f16..e2239c878e02bb761e5df576a376303f62989cc0 100644 --- a/src/plugins/debugger/gdbengine.cpp +++ b/src/plugins/debugger/gdbengine.cpp @@ -656,7 +656,7 @@ void GdbEngine::flushCommand(GdbCommand &cmd) ++currentToken(); m_cookieForToken[currentToken()] = cmd; cmd.command = QString::number(currentToken()) + cmd.command; - if (cmd.command.contains(__("%1"))) + if (cmd.flags & EmbedToken) cmd.command = cmd.command.arg(currentToken()); m_gdbProc.write(cmd.command.toLatin1() + "\r\n"); @@ -2922,7 +2922,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren) QVariant var; var.setValue(data); - execCommand(cmd, WatchUpdate, CB(handleDebuggingHelperValue1), var); + execCommand(cmd, WatchUpdate | EmbedToken, CB(handleDebuggingHelperValue1), var); q->showStatusMessage( tr("Retrieving data for watch view (%1 requests pending)...") @@ -3933,7 +3933,7 @@ void GdbEngine::tryLoadDebuggingHelpers() execCommand(_("sharedlibrary ") + dotEscape(lib)); #endif // retreive list of dumpable classes - execCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)")); + execCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"), EmbedToken); execCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper)); } @@ -3941,7 +3941,7 @@ void GdbEngine::recheckDebuggingHelperAvailability() { if (startModeAllowsDumpers()) { // retreive list of dumpable classes - execCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)")); + execCommand(_("call (void*)qDumpObjectData440(1,%1+1,0,0,0,0,0,0)"), EmbedToken); execCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper)); } } diff --git a/src/plugins/debugger/gdbengine.h b/src/plugins/debugger/gdbengine.h index a3767ce45c4e223b7e65398083a43a53059bbe26..d749e75190ab0056c963ef3a6f94d8f686ff1e7f 100644 --- a/src/plugins/debugger/gdbengine.h +++ b/src/plugins/debugger/gdbengine.h @@ -147,7 +147,8 @@ public: // otherwise the Qt flag macros are unhappy NeedsStop = 1, Discardable = 2, RebuildModel = 4, - WatchUpdate = Discardable|RebuildModel + WatchUpdate = Discardable|RebuildModel, + EmbedToken = 8 }; Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag) private: