forked from qt-creator/qt-creator
debugger: make DebuggerEngine::acceptsBreakpoint(id) pure
This commit is contained in:
@@ -1237,11 +1237,6 @@ void DebuggerEngine::attemptBreakpointSynchronization()
|
||||
d->m_disassemblerViewAgent.updateBreakpointMarkers();
|
||||
}
|
||||
|
||||
bool DebuggerEngine::acceptsBreakpoint(BreakpointId) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void DebuggerEngine::insertBreakpoint(BreakpointId)
|
||||
{
|
||||
QTC_ASSERT(false, /**/);
|
||||
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
|
||||
virtual bool stateAcceptsBreakpointChanges() const { return true; }
|
||||
virtual void attemptBreakpointSynchronization();
|
||||
virtual bool acceptsBreakpoint(BreakpointId id) const; // FIXME: make pure
|
||||
virtual bool acceptsBreakpoint(BreakpointId id) const = 0;
|
||||
virtual void insertBreakpoint(BreakpointId id); // FIXME: make pure
|
||||
virtual void removeBreakpoint(BreakpointId id); // FIXME: make pure
|
||||
virtual void changeBreakpoint(BreakpointId id); // FIXME: make pure
|
||||
|
||||
@@ -475,15 +475,16 @@ class DummyEngine : public DebuggerEngine
|
||||
|
||||
public:
|
||||
DummyEngine() : DebuggerEngine(DebuggerStartParameters()) {}
|
||||
virtual ~DummyEngine() {}
|
||||
~DummyEngine() {}
|
||||
|
||||
virtual void setupEngine() {}
|
||||
virtual void setupInferior() {}
|
||||
virtual void runEngine() {}
|
||||
virtual void shutdownEngine() {}
|
||||
virtual void shutdownInferior() {}
|
||||
virtual void executeDebuggerCommand(const QString &) {}
|
||||
virtual unsigned debuggerCapabilities() const { return 0; }
|
||||
void setupEngine() {}
|
||||
void setupInferior() {}
|
||||
void runEngine() {}
|
||||
void shutdownEngine() {}
|
||||
void shutdownInferior() {}
|
||||
void executeDebuggerCommand(const QString &) {}
|
||||
unsigned debuggerCapabilities() const { return 0; }
|
||||
bool acceptsBreakpoint(BreakpointId) const { return false; }
|
||||
};
|
||||
|
||||
static DebuggerEngine *dummyEngine()
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
void activateFrame(int index);
|
||||
void selectThread(int index);
|
||||
void fetchDisassembler(DisassemblerViewAgent *);
|
||||
bool acceptsBreakpoint(BreakpointId) const { return true; } // FIXME
|
||||
void insertBreakpoint(BreakpointId id);
|
||||
void removeBreakpoint(BreakpointId id);
|
||||
void changeBreakpoint(BreakpointId id);
|
||||
|
||||
@@ -242,7 +242,7 @@ void QmlCppEngine::attemptBreakpointSynchronization()
|
||||
static_cast<DebuggerEngine*>(d->m_qmlEngine)->attemptBreakpointSynchronization();
|
||||
}
|
||||
|
||||
bool QmlCppEngine::acceptsBreakpoint(BreakpointId id)
|
||||
bool QmlCppEngine::acceptsBreakpoint(BreakpointId id) const
|
||||
{
|
||||
return d->m_cppEngine->acceptsBreakpoint(id)
|
||||
|| d->m_qmlEngine->acceptsBreakpoint(id);
|
||||
|
||||
@@ -56,10 +56,10 @@ public:
|
||||
virtual void updateAll();
|
||||
|
||||
virtual void attemptBreakpointSynchronization();
|
||||
virtual bool acceptsBreakpoint(BreakpointId id);
|
||||
virtual bool acceptsBreakpoint(BreakpointId id) const;
|
||||
virtual void selectThread(int index);
|
||||
|
||||
virtual void assignValueInDebugger(const Internal::WatchData *w,
|
||||
virtual void assignValueInDebugger(const Internal::WatchData *data,
|
||||
const QString &expr, const QVariant &value);
|
||||
|
||||
QAbstractItemModel *modulesModel() const;
|
||||
|
||||
@@ -494,7 +494,7 @@ void QmlEngine::attemptBreakpointSynchronization()
|
||||
sendMessage(reply);
|
||||
}
|
||||
|
||||
bool QmlEngine::acceptsBreakpoint(BreakpointId id)
|
||||
bool QmlEngine::acceptsBreakpoint(BreakpointId id) const
|
||||
{
|
||||
const QString fileName = breakHandler()->fileName(id);
|
||||
return fileName.endsWith(QLatin1String(".qml"))
|
||||
|
||||
@@ -93,7 +93,7 @@ private:
|
||||
void selectThread(int index);
|
||||
|
||||
void attemptBreakpointSynchronization();
|
||||
bool acceptsBreakpoint(BreakpointId id);
|
||||
bool acceptsBreakpoint(BreakpointId id) const;
|
||||
|
||||
void assignValueInDebugger(const Internal::WatchData *data,
|
||||
const QString &expr, const QVariant &value);
|
||||
|
||||
@@ -447,6 +447,12 @@ void ScriptEngine::selectThread(int index)
|
||||
Q_UNUSED(index)
|
||||
}
|
||||
|
||||
bool ScriptEngine::acceptsBreakpoint(BreakpointId id) const
|
||||
{
|
||||
const QString fileName = breakHandler()->fileName(id);
|
||||
return fileName.endsWith(QLatin1String(".js"));
|
||||
}
|
||||
|
||||
void ScriptEngine::attemptBreakpointSynchronization()
|
||||
{
|
||||
QTC_ASSERT(false, /* FIXME */);
|
||||
|
||||
@@ -87,6 +87,7 @@ private:
|
||||
void activateFrame(int index);
|
||||
void selectThread(int index);
|
||||
|
||||
bool acceptsBreakpoint(BreakpointId id) const;
|
||||
void attemptBreakpointSynchronization();
|
||||
|
||||
void assignValueInDebugger(const WatchData *w,
|
||||
|
||||
@@ -92,8 +92,10 @@ private:
|
||||
void selectThread(int index);
|
||||
|
||||
void attemptBreakpointSynchronization();
|
||||
bool acceptsBreakpoint(BreakpointId) const { return false; }
|
||||
|
||||
void assignValueInDebugger(const Internal::WatchData *w, const QString &expr, const QVariant &value);
|
||||
void assignValueInDebugger(const WatchData *data,
|
||||
const QString &expr, const QVariant &value);
|
||||
void executeDebuggerCommand(const QString &command);
|
||||
|
||||
void loadSymbols(const QString &moduleName);
|
||||
|
||||
Reference in New Issue
Block a user