forked from qt-creator/qt-creator
debugger: simplify updateLocals() parameters
Change-Id: I7da344c8eeade5153fb0b98a45e139654a2119dd Reviewed-on: http://codereview.qt.nokia.com/177 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -695,9 +695,11 @@ static bool parseConsoleStream(const GdbResponse &response, GdbMi *contents)
|
||||
return contents->isValid();
|
||||
}
|
||||
|
||||
void GdbEngine::updateLocalsClassic(const QVariant &cookie)
|
||||
void GdbEngine::updateLocalsClassic()
|
||||
{
|
||||
PRECONDITION;
|
||||
m_pendingWatchRequests = 0;
|
||||
m_pendingBreakpointRequests = 0;
|
||||
m_processedNames.clear();
|
||||
|
||||
if (0 && debugPending)
|
||||
@@ -713,7 +715,7 @@ void GdbEngine::updateLocalsClassic(const QVariant &cookie)
|
||||
CB(handleStackListArgumentsClassic));
|
||||
// '2' is 'list with type and value'
|
||||
postCommand("-stack-list-locals 2", WatchUpdate,
|
||||
CB(handleStackListLocalsClassic), cookie); // stage 2/2
|
||||
CB(handleStackListLocalsClassic)); // stage 2/2
|
||||
}
|
||||
|
||||
static inline QString msgRetrievingWatchData(int pending)
|
||||
|
||||
@@ -3628,16 +3628,15 @@ bool GdbEngine::setToolTipExpression(const QPoint &mousePos,
|
||||
qDebug() << "GdbEngine::setToolTipExpression2 " << exp << (*m_toolTipContext);
|
||||
|
||||
if (isSynchronous()) {
|
||||
updateLocals(QVariant());
|
||||
return true;
|
||||
updateLocalsPython(true, tooltipIName(exp));
|
||||
} else {
|
||||
WatchData toolTip;
|
||||
toolTip.exp = exp.toLatin1();
|
||||
toolTip.name = exp;
|
||||
toolTip.iname = tooltipIName(exp);
|
||||
watchHandler()->removeData(toolTip.iname);
|
||||
watchHandler()->insertData(toolTip);
|
||||
}
|
||||
|
||||
WatchData toolTip;
|
||||
toolTip.exp = exp.toLatin1();
|
||||
toolTip.name = exp;
|
||||
toolTip.iname = tooltipIName(exp);
|
||||
watchHandler()->removeData(toolTip.iname);
|
||||
watchHandler()->insertData(toolTip);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3715,10 +3714,7 @@ void GdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &f
|
||||
&& m_pendingWatchRequests == 0
|
||||
&& m_pendingBreakpointRequests == 0;
|
||||
|
||||
if (tryPartial)
|
||||
updateLocalsPython(true, data.iname);
|
||||
else
|
||||
updateLocals();
|
||||
updateLocalsPython(tryPartial, data.iname);
|
||||
#endif
|
||||
} else {
|
||||
// Bump requests to avoid model rebuilding during the nested
|
||||
@@ -3846,14 +3842,12 @@ void GdbEngine::handleDebuggingHelperSetup(const GdbResponse &response)
|
||||
}
|
||||
}
|
||||
|
||||
void GdbEngine::updateLocals(const QVariant &cookie)
|
||||
void GdbEngine::updateLocals()
|
||||
{
|
||||
m_pendingWatchRequests = 0;
|
||||
m_pendingBreakpointRequests = 0;
|
||||
if (hasPython())
|
||||
updateLocalsPython(false, QByteArray());
|
||||
else
|
||||
updateLocalsClassic(cookie);
|
||||
updateLocalsClassic();
|
||||
}
|
||||
|
||||
// Parse a local variable from GdbMi.
|
||||
|
||||
@@ -644,8 +644,8 @@ private: ////////// View & Data Stuff //////////
|
||||
Q_SLOT void createFullBacktrace();
|
||||
void handleCreateFullBacktrace(const GdbResponse &response);
|
||||
|
||||
void updateLocals(const QVariant &cookie = QVariant());
|
||||
void updateLocalsClassic(const QVariant &cookie);
|
||||
void updateLocals();
|
||||
void updateLocalsClassic();
|
||||
void updateLocalsPython(bool tryPartial, const QByteArray &varList);
|
||||
void handleStackFramePython(const GdbResponse &response);
|
||||
|
||||
|
||||
@@ -54,6 +54,8 @@ namespace Internal {
|
||||
void GdbEngine::updateLocalsPython(bool tryPartial, const QByteArray &varList)
|
||||
{
|
||||
PRECONDITION;
|
||||
m_pendingWatchRequests = 0;
|
||||
m_pendingBreakpointRequests = 0;
|
||||
m_processedNames.clear();
|
||||
WatchHandler *handler = watchHandler();
|
||||
handler->beginCycle(!tryPartial);
|
||||
|
||||
Reference in New Issue
Block a user