forked from qt-creator/qt-creator
Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into a bool canHandleToolTip(), and the actual processing of the request, which is mostly identical to the handling of a watcher. Handling a watcher is now mostly the same as a full Locals update, except for the 'partial' flag. Pushing the handling of that down to the bridges gives identical code paths in the gdb and lldbengine. Move that to the DebuggerEngine base class. Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -378,16 +378,9 @@ void PdbEngine::refreshSymbols(const GdbMi &symbols)
|
||||
Internal::showModuleSymbols(moduleName, syms);
|
||||
}
|
||||
|
||||
bool PdbEngine::setToolTipExpression(const DebuggerToolTipContext &ctx)
|
||||
bool PdbEngine::canHandleToolTip(const DebuggerToolTipContext &) const
|
||||
{
|
||||
if (state() != InferiorStopOk)
|
||||
return false;
|
||||
|
||||
DebuggerCommand cmd("evaluateTooltip");
|
||||
ctx.appendFormatRequest(&cmd);
|
||||
watchHandler()->appendFormatRequests(&cmd);
|
||||
runCommand(cmd);
|
||||
return true;
|
||||
return state() == InferiorStopOk;
|
||||
}
|
||||
|
||||
void PdbEngine::assignValueInDebugger(WatchItem *, const QString &expression, const QVariant &value)
|
||||
@@ -401,9 +394,9 @@ void PdbEngine::assignValueInDebugger(WatchItem *, const QString &expression, co
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
void PdbEngine::updateWatchItem(WatchItem *item)
|
||||
void PdbEngine::updateWatchData(const QByteArray &iname)
|
||||
{
|
||||
Q_UNUSED(item);
|
||||
Q_UNUSED(iname);
|
||||
updateAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user