Commit 34c807a1 authored by hjk's avatar hjk

Debugger: Remove WatchUpdateFlags

Only needed in the non-Python days. CDB didn't use it to start with.

Change-Id: Ia609218cc1a694f797e278c4d99ead68e6212938
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 7c2c3307
...@@ -972,13 +972,11 @@ static inline bool isWatchIName(const QByteArray &iname) ...@@ -972,13 +972,11 @@ static inline bool isWatchIName(const QByteArray &iname)
return iname.startsWith("watch"); return iname.startsWith("watch");
} }
void CdbEngine::updateWatchData(const WatchData &dataIn, void CdbEngine::updateWatchData(const WatchData &dataIn)
const WatchUpdateFlags & flags)
{ {
if (debug || debugLocals || debugWatches) if (debug || debugLocals || debugWatches)
qDebug("CdbEngine::updateWatchData() %dms accessible=%d %s incr=%d: %s", qDebug("CdbEngine::updateWatchData() %dms accessible=%d %s: %s",
elapsedLogTime(), m_accessible, stateName(state()), elapsedLogTime(), m_accessible, stateName(state()),
flags.tryIncremental,
qPrintable(dataIn.toString())); qPrintable(dataIn.toString()));
if (!m_accessible) // Add watch data while running? if (!m_accessible) // Add watch data while running?
......
...@@ -89,8 +89,7 @@ public: ...@@ -89,8 +89,7 @@ public:
virtual void shutdownEngine(); virtual void shutdownEngine();
virtual void abortDebugger(); virtual void abortDebugger();
virtual void detachDebugger(); virtual void detachDebugger();
virtual void updateWatchData(const WatchData &data, virtual void updateWatchData(const WatchData &data);
const WatchUpdateFlags & flags = WatchUpdateFlags());
virtual bool hasCapability(unsigned cap) const; virtual bool hasCapability(unsigned cap) const;
virtual void watchPoint(const QPoint &); virtual void watchPoint(const QPoint &);
virtual void setRegisterValue(const QByteArray &name, const QString &value); virtual void setRegisterValue(const QByteArray &name, const QString &value);
......
...@@ -1440,7 +1440,7 @@ bool DebuggerEngine::setToolTipExpression(TextEditorWidget *, ...@@ -1440,7 +1440,7 @@ bool DebuggerEngine::setToolTipExpression(TextEditorWidget *,
return false; return false;
} }
void DebuggerEngine::updateWatchData(const WatchData &, const WatchUpdateFlags &) void DebuggerEngine::updateWatchData(const WatchData &)
{ {
} }
......
...@@ -78,12 +78,6 @@ class MemoryViewSetupData; ...@@ -78,12 +78,6 @@ class MemoryViewSetupData;
class Terminal; class Terminal;
class ThreadId; class ThreadId;
struct WatchUpdateFlags
{
WatchUpdateFlags() : tryIncremental(false) {}
bool tryIncremental;
};
class Location class Location
{ {
public: public:
...@@ -146,8 +140,7 @@ public: ...@@ -146,8 +140,7 @@ public:
virtual bool setToolTipExpression(TextEditor::TextEditorWidget *, virtual bool setToolTipExpression(TextEditor::TextEditorWidget *,
const Internal::DebuggerToolTipContext &); const Internal::DebuggerToolTipContext &);
virtual void updateWatchData(const Internal::WatchData &data, virtual void updateWatchData(const Internal::WatchData &data);
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
virtual void watchDataSelected(const QByteArray &iname); virtual void watchDataSelected(const QByteArray &iname);
virtual void startDebugger(DebuggerRunControl *runControl); virtual void startDebugger(DebuggerRunControl *runControl);
......
...@@ -3725,10 +3725,10 @@ void GdbEngine::reloadLocals() ...@@ -3725,10 +3725,10 @@ void GdbEngine::reloadLocals()
updateLocals(); updateLocals();
} }
void GdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags) void GdbEngine::updateWatchData(const WatchData &data)
{ {
UpdateParameters params; UpdateParameters params;
params.tryPartial = flags.tryIncremental && m_pendingBreakpointRequests == 0; params.tryPartial = m_pendingBreakpointRequests == 0;
params.varList = data.iname; params.varList = data.iname;
updateLocalsPython(params); updateLocalsPython(params);
} }
......
...@@ -399,7 +399,7 @@ protected: ...@@ -399,7 +399,7 @@ protected:
virtual void watchPoint(const QPoint &); virtual void watchPoint(const QPoint &);
void handleWatchPoint(const DebuggerResponse &response); void handleWatchPoint(const DebuggerResponse &response);
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags); void updateWatchData(const WatchData &data);
void rebuildWatchModel(); void rebuildWatchModel();
void showToolTip(); void showToolTip();
......
...@@ -844,10 +844,9 @@ void LldbEngine::assignValueInDebugger(const Internal::WatchData *data, ...@@ -844,10 +844,9 @@ void LldbEngine::assignValueInDebugger(const Internal::WatchData *data,
runCommand(cmd); runCommand(cmd);
} }
void LldbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags) void LldbEngine::updateWatchData(const WatchData &data)
{ {
Q_UNUSED(data); Q_UNUSED(data);
Q_UNUSED(flags);
updateLocals(); updateLocals();
} }
......
...@@ -120,7 +120,7 @@ private: ...@@ -120,7 +120,7 @@ private:
bool supportsThreads() const { return true; } bool supportsThreads() const { return true; }
bool isSynchronous() const { return true; } bool isSynchronous() const { return true; }
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags); void updateWatchData(const WatchData &data);
void setRegisterValue(const QByteArray &name, const QString &value); void setRegisterValue(const QByteArray &name, const QString &value);
void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length); void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length);
......
...@@ -395,10 +395,9 @@ void PdbEngine::assignValueInDebugger(const WatchData *, const QString &expressi ...@@ -395,10 +395,9 @@ void PdbEngine::assignValueInDebugger(const WatchData *, const QString &expressi
updateLocals(); updateLocals();
} }
void PdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags) void PdbEngine::updateWatchData(const WatchData &data)
{ {
Q_UNUSED(data); Q_UNUSED(data);
Q_UNUSED(flags);
updateAll(); updateAll();
} }
......
...@@ -97,7 +97,7 @@ private: ...@@ -97,7 +97,7 @@ private:
bool supportsThreads() const { return true; } bool supportsThreads() const { return true; }
bool isSynchronous() const { return true; } bool isSynchronous() const { return true; }
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags); void updateWatchData(const WatchData &data);
QString mainPythonFile() const; QString mainPythonFile() const;
void runCommand(const DebuggerCommand &cmd); void runCommand(const DebuggerCommand &cmd);
......
...@@ -115,13 +115,12 @@ bool QmlCppEngine::setToolTipExpression(TextEditor::TextEditorWidget *editorWidg ...@@ -115,13 +115,12 @@ bool QmlCppEngine::setToolTipExpression(TextEditor::TextEditorWidget *editorWidg
return success; return success;
} }
void QmlCppEngine::updateWatchData(const WatchData &data, void QmlCppEngine::updateWatchData(const WatchData &data)
const WatchUpdateFlags &flags)
{ {
if (data.isInspect()) if (data.isInspect())
m_qmlEngine->updateWatchData(data, flags); m_qmlEngine->updateWatchData(data);
else else
m_activeEngine->updateWatchData(data, flags); m_activeEngine->updateWatchData(data);
} }
void QmlCppEngine::watchDataSelected(const QByteArray &iname) void QmlCppEngine::watchDataSelected(const QByteArray &iname)
......
...@@ -49,8 +49,7 @@ public: ...@@ -49,8 +49,7 @@ public:
bool canDisplayTooltip() const; bool canDisplayTooltip() const;
bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget, bool setToolTipExpression(TextEditor::TextEditorWidget *editorWidget,
const DebuggerToolTipContext &); const DebuggerToolTipContext &);
void updateWatchData(const WatchData &data, void updateWatchData(const WatchData &data);
const WatchUpdateFlags &flags);
void watchDataSelected(const QByteArray &iname); void watchDataSelected(const QByteArray &iname);
void watchPoint(const QPoint &); void watchPoint(const QPoint &);
......
...@@ -999,8 +999,7 @@ void QmlEngine::assignValueInDebugger(const WatchData *data, ...@@ -999,8 +999,7 @@ void QmlEngine::assignValueInDebugger(const WatchData *data,
} }
} }
void QmlEngine::updateWatchData(const WatchData &data, void QmlEngine::updateWatchData(const WatchData &data)
const WatchUpdateFlags &)
{ {
// qDebug() << "UPDATE WATCH DATA" << data.toString(); // qDebug() << "UPDATE WATCH DATA" << data.toString();
//showStatusMessage(tr("Stopped."), 5000); //showStatusMessage(tr("Stopped."), 5000);
......
...@@ -159,8 +159,7 @@ private: ...@@ -159,8 +159,7 @@ private:
void reloadFullStack() {} void reloadFullStack() {}
bool supportsThreads() const { return false; } bool supportsThreads() const { return false; }
void updateWatchData(const WatchData &data, void updateWatchData(const WatchData &data);
const WatchUpdateFlags &flags);
void watchDataSelected(const QByteArray &iname); void watchDataSelected(const QByteArray &iname);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages); void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
bool evaluateScript(const QString &expression); bool evaluateScript(const QString &expression);
......
...@@ -628,9 +628,7 @@ void WatchItem::fetchMore() ...@@ -628,9 +628,7 @@ void WatchItem::fetchMore()
fetchTriggered = true; fetchTriggered = true;
if (children().isEmpty()) { if (children().isEmpty()) {
d.setChildrenNeeded(); d.setChildrenNeeded();
WatchUpdateFlags flags; watchModel()->engine()->updateWatchData(d);
flags.tryIncremental = true;
watchModel()->engine()->updateWatchData(d, flags);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment