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();
|
return contents->isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::updateLocalsClassic(const QVariant &cookie)
|
void GdbEngine::updateLocalsClassic()
|
||||||
{
|
{
|
||||||
PRECONDITION;
|
PRECONDITION;
|
||||||
|
m_pendingWatchRequests = 0;
|
||||||
|
m_pendingBreakpointRequests = 0;
|
||||||
m_processedNames.clear();
|
m_processedNames.clear();
|
||||||
|
|
||||||
if (0 && debugPending)
|
if (0 && debugPending)
|
||||||
@@ -713,7 +715,7 @@ void GdbEngine::updateLocalsClassic(const QVariant &cookie)
|
|||||||
CB(handleStackListArgumentsClassic));
|
CB(handleStackListArgumentsClassic));
|
||||||
// '2' is 'list with type and value'
|
// '2' is 'list with type and value'
|
||||||
postCommand("-stack-list-locals 2", WatchUpdate,
|
postCommand("-stack-list-locals 2", WatchUpdate,
|
||||||
CB(handleStackListLocalsClassic), cookie); // stage 2/2
|
CB(handleStackListLocalsClassic)); // stage 2/2
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString msgRetrievingWatchData(int pending)
|
static inline QString msgRetrievingWatchData(int pending)
|
||||||
|
|||||||
@@ -3628,16 +3628,15 @@ bool GdbEngine::setToolTipExpression(const QPoint &mousePos,
|
|||||||
qDebug() << "GdbEngine::setToolTipExpression2 " << exp << (*m_toolTipContext);
|
qDebug() << "GdbEngine::setToolTipExpression2 " << exp << (*m_toolTipContext);
|
||||||
|
|
||||||
if (isSynchronous()) {
|
if (isSynchronous()) {
|
||||||
updateLocals(QVariant());
|
updateLocalsPython(true, tooltipIName(exp));
|
||||||
return true;
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3715,10 +3714,7 @@ void GdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &f
|
|||||||
&& m_pendingWatchRequests == 0
|
&& m_pendingWatchRequests == 0
|
||||||
&& m_pendingBreakpointRequests == 0;
|
&& m_pendingBreakpointRequests == 0;
|
||||||
|
|
||||||
if (tryPartial)
|
updateLocalsPython(tryPartial, data.iname);
|
||||||
updateLocalsPython(true, data.iname);
|
|
||||||
else
|
|
||||||
updateLocals();
|
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// Bump requests to avoid model rebuilding during the nested
|
// 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())
|
if (hasPython())
|
||||||
updateLocalsPython(false, QByteArray());
|
updateLocalsPython(false, QByteArray());
|
||||||
else
|
else
|
||||||
updateLocalsClassic(cookie);
|
updateLocalsClassic();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse a local variable from GdbMi.
|
// Parse a local variable from GdbMi.
|
||||||
|
|||||||
@@ -644,8 +644,8 @@ private: ////////// View & Data Stuff //////////
|
|||||||
Q_SLOT void createFullBacktrace();
|
Q_SLOT void createFullBacktrace();
|
||||||
void handleCreateFullBacktrace(const GdbResponse &response);
|
void handleCreateFullBacktrace(const GdbResponse &response);
|
||||||
|
|
||||||
void updateLocals(const QVariant &cookie = QVariant());
|
void updateLocals();
|
||||||
void updateLocalsClassic(const QVariant &cookie);
|
void updateLocalsClassic();
|
||||||
void updateLocalsPython(bool tryPartial, const QByteArray &varList);
|
void updateLocalsPython(bool tryPartial, const QByteArray &varList);
|
||||||
void handleStackFramePython(const GdbResponse &response);
|
void handleStackFramePython(const GdbResponse &response);
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ namespace Internal {
|
|||||||
void GdbEngine::updateLocalsPython(bool tryPartial, const QByteArray &varList)
|
void GdbEngine::updateLocalsPython(bool tryPartial, const QByteArray &varList)
|
||||||
{
|
{
|
||||||
PRECONDITION;
|
PRECONDITION;
|
||||||
|
m_pendingWatchRequests = 0;
|
||||||
|
m_pendingBreakpointRequests = 0;
|
||||||
m_processedNames.clear();
|
m_processedNames.clear();
|
||||||
WatchHandler *handler = watchHandler();
|
WatchHandler *handler = watchHandler();
|
||||||
handler->beginCycle(!tryPartial);
|
handler->beginCycle(!tryPartial);
|
||||||
|
|||||||
Reference in New Issue
Block a user