self.passExceptions = "pe" in options
self.autoDerefPointers = "autoderef" in options
self.partialUpdate = "partial" in options
+ self.tooltipOnly = "tooltiponly" in options
+ self.noLocals = "nolocals" in options
self.ns = qtNamespace()
self.alienSource = False
#try:
#warn("VARIABLES: %s" % varList)
#warn("EXPANDED INAMES: %s" % self.expandedINames)
#warn("WATCHERS: %s" % watchers)
+ #warn("PARTIAL: %s" % self.partialUpdate)
+ #warn("NO LOCALS: %s" % self.noLocals)
module = sys.modules[__name__]
#
pass
varList = []
- if fullUpdateNeeded:
+ locals = []
+ if fullUpdateNeeded and not self.tooltipOnly and not self.noLocals:
locals = listOfLocals(varList)
- if "nolocals" in options:
- locals = []
# Take care of the return value of the last function call.
if len(resultVarName) > 0:
qDebug() << "GdbEngine::setToolTipExpression2 " << exp << (*m_toolTipContext);
if (isSynchronous()) {
- updateLocalsPython(true, tooltipIName(exp));
+ UpdateParameters params;
+ params.tryPartial = true;
+ params.tooltipOnly = true;
+ params.varList = tooltipIName(exp);
+ updateLocalsPython(params);
} else {
WatchData toolTip;
toolTip.exp = exp.toLatin1();
// << (m_pendingWatchRequests == 0)
// << (m_pendingBreakpointRequests == 0);
- bool tryPartial = flags.tryIncremental
+ UpdateParameters params;
+ params.tryPartial = flags.tryIncremental
&& hasPython()
&& m_pendingWatchRequests == 0
&& m_pendingBreakpointRequests == 0;
+ params.tooltipOnly = false;
+ params.varList = data.iname;
- updateLocalsPython(tryPartial, data.iname);
+ updateLocalsPython(params);
#endif
} else {
// Bump requests to avoid model rebuilding during the nested
void GdbEngine::updateLocals()
{
if (hasPython())
- updateLocalsPython(false, QByteArray());
+ updateLocalsPython(UpdateParameters());
else
updateLocalsClassic();
}
};
+class UpdateParameters
+{
+public:
+ UpdateParameters() { tryPartial = tooltipOnly = false; }
+
+ bool tryPartial;
+ bool tooltipOnly;
+ QByteArray varList;
+};
+
/* This is only used with Mac gdb since 2.2
*
* "Custom dumper" is a library compiled against the current
void updateLocals();
void updateLocalsClassic();
- void updateLocalsPython(bool tryPartial, const QByteArray &varList);
+ void updateLocalsPython(const UpdateParameters ¶meters);
void handleStackFramePython(const GdbResponse &response);
void handleStackListLocalsClassic(const GdbResponse &response);
namespace Debugger {
namespace Internal {
-void GdbEngine::updateLocalsPython(bool tryPartial, const QByteArray &varList)
+void GdbEngine::updateLocalsPython(const UpdateParameters ¶ms)
{
PRECONDITION;
m_pendingWatchRequests = 0;
m_pendingBreakpointRequests = 0;
m_processedNames.clear();
WatchHandler *handler = watchHandler();
- handler->beginCycle(!tryPartial);
+ handler->beginCycle(!params.tryPartial);
QByteArray expanded = "expanded:" + handler->expansionRequests() + ' ';
expanded += "typeformats:" + handler->typeFormatRequests() + ' ';
options += "pe,";
if (options.isEmpty())
options += "defaults,";
- if (tryPartial)
+ if (params.tryPartial)
options += "partial,";
+ if (params.tooltipOnly)
+ options += "tooltiponly,";
options.chop(1);
QByteArray resultVar;
if (!m_resultVarName.isEmpty())
resultVar = "resultvarname:" + m_resultVarName + ' ';
- postCommand("bb options:" + options + " vars:" + varList + ' '
+ postCommand("bb options:" + options + " vars:" + params.varList + ' '
+ resultVar + expanded + " watchers:" + watchers.toHex(),
- WatchUpdate, CB(handleStackFramePython), QVariant(tryPartial));
+ WatchUpdate, CB(handleStackFramePython), QVariant(params.tryPartial));
}
void GdbEngine::handleStackListLocalsPython(const GdbResponse &response)
varList.append(',');
varList.append(child.data());
}
- updateLocalsPython(false, varList);
+ UpdateParameters params;
+ updateLocalsPython(params);
}
}