diff options
author | hjk <hjk@theqtcompany.com> | 2015-10-13 16:58:04 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-10-14 13:38:07 +0000 |
commit | 23f3fcbabc4959c5d05d821b25776f6344d9b42b (patch) | |
tree | 30f749073da023dfac58e3216c83275ac5509e56 /src/qml/jsruntime/qv4debugging_p.h | |
parent | 4f3379352a265bab00a7265f85ffc38a9ca4ffe4 (diff) |
QmlDebug: Split QV4::Debugging::Debugger
... into a pure interface and a QV4::Debugging::V4Debugger implementation.
This is in preparation of a second implementation of this interface
to be used with 'native mixed' debugging.
Change-Id: I3078dcfe4bdee392a2d13ef43a55ca993e7b88d8
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4debugging_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4debugging_p.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 9b07a31f26..fdc9cac24f 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -93,6 +93,19 @@ typedef QHash<DebuggerBreakPoint, QString> BreakPoints; class Q_QML_EXPORT Debugger : public QObject { Q_OBJECT + +public: + virtual ~Debugger() {} + virtual bool pauseAtNextOpportunity() const = 0; + virtual void maybeBreakAtInstruction() = 0; + virtual void enteringFunction() = 0; + virtual void leavingFunction(const ReturnedValue &retVal) = 0; + virtual void aboutToThrow() = 0; +}; + +class Q_QML_EXPORT V4Debugger : public Debugger +{ + Q_OBJECT public: class Q_QML_EXPORT Job { @@ -131,7 +144,7 @@ public: NotStepping = FullThrottle }; - Debugger(ExecutionEngine *engine); + V4Debugger(ExecutionEngine *engine); ExecutionEngine *engine() const { return m_engine; } @@ -173,14 +186,14 @@ public: // execution hooks void aboutToThrow(); signals: - void sourcesCollected(QV4::Debugging::Debugger *self, const QStringList &sources, int seq); - void debuggerPaused(QV4::Debugging::Debugger *self, QV4::Debugging::PauseReason reason); + void sourcesCollected(QV4::Debugging::V4Debugger *self, const QStringList &sources, int seq); + void debuggerPaused(QV4::Debugging::V4Debugger *self, QV4::Debugging::PauseReason reason); private: // requires lock to be held void pauseAndWait(PauseReason reason); bool reallyHitTheBreakPoint(const QString &filename, int linenr); - void runInEngine_havingLock(Debugger::Job *job); + void runInEngine_havingLock(V4Debugger::Job *job); private: QV4::ExecutionEngine *m_engine; |