Commit 905f3d6c authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

use explicit flag to request token substitution in gdb command instead

of searching for something which looks like one.
parent fbe979a5
...@@ -656,7 +656,7 @@ void GdbEngine::flushCommand(GdbCommand &cmd) ...@@ -656,7 +656,7 @@ void GdbEngine::flushCommand(GdbCommand &cmd)
++currentToken(); ++currentToken();
m_cookieForToken[currentToken()] = cmd; m_cookieForToken[currentToken()] = cmd;
cmd.command = QString::number(currentToken()) + cmd.command; cmd.command = QString::number(currentToken()) + cmd.command;
if (cmd.command.contains(__("%1"))) if (cmd.flags & EmbedToken)
cmd.command = cmd.command.arg(currentToken()); cmd.command = cmd.command.arg(currentToken());
m_gdbProc.write(cmd.command.toLatin1() + "\r\n"); m_gdbProc.write(cmd.command.toLatin1() + "\r\n");
...@@ -2922,7 +2922,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren) ...@@ -2922,7 +2922,7 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
QVariant var; QVariant var;
var.setValue(data); var.setValue(data);
execCommand(cmd, WatchUpdate, CB(handleDebuggingHelperValue1), var); execCommand(cmd, WatchUpdate | EmbedToken, CB(handleDebuggingHelperValue1), var);
q->showStatusMessage( q->showStatusMessage(
tr("Retrieving data for watch view (%1 requests pending)...") tr("Retrieving data for watch view (%1 requests pending)...")
...@@ -3933,7 +3933,7 @@ void GdbEngine::tryLoadDebuggingHelpers() ...@@ -3933,7 +3933,7 @@ void GdbEngine::tryLoadDebuggingHelpers()
execCommand(_("sharedlibrary ") + dotEscape(lib)); execCommand(_("sharedlibrary ") + dotEscape(lib));
#endif #endif
// retreive list of dumpable classes // 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)); execCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper));
} }
...@@ -3941,7 +3941,7 @@ void GdbEngine::recheckDebuggingHelperAvailability() ...@@ -3941,7 +3941,7 @@ void GdbEngine::recheckDebuggingHelperAvailability()
{ {
if (startModeAllowsDumpers()) { if (startModeAllowsDumpers()) {
// retreive list of dumpable classes // 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)); execCommand(_("p (char*)&qDumpOutBuffer"), CB(handleQueryDebuggingHelper));
} }
} }
......
...@@ -147,7 +147,8 @@ public: // otherwise the Qt flag macros are unhappy ...@@ -147,7 +147,8 @@ public: // otherwise the Qt flag macros are unhappy
NeedsStop = 1, NeedsStop = 1,
Discardable = 2, Discardable = 2,
RebuildModel = 4, RebuildModel = 4,
WatchUpdate = Discardable|RebuildModel WatchUpdate = Discardable|RebuildModel,
EmbedToken = 8
}; };
Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag) Q_DECLARE_FLAGS(GdbCommandFlags, GdbCommandFlag)
private: private:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment