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:
@@ -814,19 +814,9 @@ void LldbEngine::refreshSymbols(const GdbMi &symbols)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool LldbEngine::setToolTipExpression(const DebuggerToolTipContext &context)
|
||||
bool LldbEngine::canHandleToolTip(const DebuggerToolTipContext &context) const
|
||||
{
|
||||
if (state() != InferiorStopOk || !context.isCppEditor) {
|
||||
//qDebug() << "SUPPRESSING DEBUGGER TOOLTIP, INFERIOR NOT STOPPED "
|
||||
// " OR NOT A CPPEDITOR";
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateParameters params;
|
||||
params.partialVariable = context.iname;
|
||||
doUpdateLocals(params);
|
||||
|
||||
return true;
|
||||
return state() == InferiorStopOk && context.isCppEditor;
|
||||
}
|
||||
|
||||
void LldbEngine::updateAll()
|
||||
@@ -867,19 +857,7 @@ void LldbEngine::assignValueInDebugger(WatchItem *,
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
void LldbEngine::updateWatchItem(WatchItem *)
|
||||
{
|
||||
doUpdateLocals(UpdateParameters());
|
||||
}
|
||||
|
||||
void LldbEngine::updateLocals()
|
||||
{
|
||||
watchHandler()->resetValueCache();
|
||||
watchHandler()->notifyUpdateStarted();
|
||||
doUpdateLocals(UpdateParameters());
|
||||
}
|
||||
|
||||
void LldbEngine::doUpdateLocals(UpdateParameters params)
|
||||
void LldbEngine::doUpdateLocals(const UpdateParameters ¶ms)
|
||||
{
|
||||
if (stackHandler()->stackSize() == 0) {
|
||||
showMessage(_("SKIPPING LOCALS DUE TO EMPTY STACK"));
|
||||
|
||||
Reference in New Issue
Block a user