forked from qt-creator/qt-creator
Debugger: Move DebuggerEngine/QmlEngine/QmlCppEngine into Debugger{}
namespace (from Debugger::Internal) as they are exported classes. Introduce private classes to avoid exposing private JS debugger headers.
This commit is contained in:
@@ -56,7 +56,7 @@ static DebuggerPlugin *plugin() { return DebuggerPlugin::instance(); }
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
BreakHandler::BreakHandler(DebuggerEngine *engine)
|
||||
BreakHandler::BreakHandler(Debugger::DebuggerEngine *engine)
|
||||
: m_breakpointIcon(_(":/debugger/images/breakpoint_16.png")),
|
||||
m_disabledBreakpointIcon(_(":/debugger/images/breakpoint_disabled_16.png")),
|
||||
m_pendingBreakPointIcon(_(":/debugger/images/breakpoint_pending_16.png")),
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// BreakHandler
|
||||
@@ -125,7 +125,7 @@ private:
|
||||
const QIcon m_emptyIcon;
|
||||
const QIcon m_watchpointIcon;
|
||||
|
||||
DebuggerEngine *m_engine; // Not owned.
|
||||
Debugger::DebuggerEngine *m_engine; // Not owned.
|
||||
Breakpoints m_bp;
|
||||
Breakpoints m_inserted; // Lately inserted breakpoints.
|
||||
Breakpoints m_removed; // Lately removed breakpoints.
|
||||
|
||||
@@ -79,14 +79,14 @@ namespace Internal {
|
||||
|
||||
namespace { const int DataRange = 1024 * 1024; }
|
||||
|
||||
MemoryViewAgent::MemoryViewAgent(DebuggerEngine *engine, quint64 addr)
|
||||
MemoryViewAgent::MemoryViewAgent(Debugger::DebuggerEngine *engine, quint64 addr)
|
||||
: QObject(engine), m_engine(engine)
|
||||
{
|
||||
QTC_ASSERT(engine, /**/);
|
||||
createBinEditor(addr);
|
||||
}
|
||||
|
||||
MemoryViewAgent::MemoryViewAgent(DebuggerEngine *engine, const QString &addr)
|
||||
MemoryViewAgent::MemoryViewAgent(Debugger::DebuggerEngine *engine, const QString &addr)
|
||||
: QObject(engine), m_engine(engine)
|
||||
{
|
||||
QTC_ASSERT(engine, /**/);
|
||||
|
||||
@@ -38,9 +38,11 @@ class IEditor;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class StackFrame;
|
||||
|
||||
class MemoryViewAgent : public QObject
|
||||
@@ -49,8 +51,8 @@ class MemoryViewAgent : public QObject
|
||||
|
||||
public:
|
||||
// Called from Gui
|
||||
explicit MemoryViewAgent(DebuggerEngine *engine, quint64 startaddr);
|
||||
explicit MemoryViewAgent(DebuggerEngine *engine, const QString &startaddr);
|
||||
explicit MemoryViewAgent(Debugger::DebuggerEngine *engine, quint64 startaddr);
|
||||
explicit MemoryViewAgent(Debugger::DebuggerEngine *engine, const QString &startaddr);
|
||||
~MemoryViewAgent();
|
||||
|
||||
enum { BinBlockSize = 1024 };
|
||||
@@ -67,7 +69,7 @@ private:
|
||||
Q_SLOT void handleEndOfFileRequested(Core::IEditor *editor);
|
||||
|
||||
QList<QPointer<Core::IEditor> > m_editors;
|
||||
QPointer<DebuggerEngine> m_engine;
|
||||
QPointer<Debugger::DebuggerEngine> m_engine;
|
||||
};
|
||||
|
||||
struct DisassemblerViewAgentPrivate;
|
||||
@@ -78,7 +80,7 @@ class DisassemblerViewAgent : public QObject
|
||||
Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType)
|
||||
public:
|
||||
// Called from Gui
|
||||
explicit DisassemblerViewAgent(DebuggerEngine *engine);
|
||||
explicit DisassemblerViewAgent(Debugger::DebuggerEngine *engine);
|
||||
~DisassemblerViewAgent();
|
||||
|
||||
void setFrame(const StackFrame &frame, bool tryMixed = true);
|
||||
|
||||
@@ -152,9 +152,6 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &sp)
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
namespace Internal {
|
||||
|
||||
const char *DebuggerEngine::stateName(int s)
|
||||
{
|
||||
# define SN(x) case x: return #x;
|
||||
@@ -1562,7 +1559,160 @@ DebuggerRunControl *DebuggerEngine::runControl() const
|
||||
return d->m_runControl;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
void DebuggerEngine::setToolTipExpression(const QPoint &, TextEditor::ITextEditor *, int)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::updateWatchData(const Internal::WatchData &, const Internal::WatchUpdateFlags &)
|
||||
{
|
||||
}
|
||||
|
||||
bool DebuggerEngine::isSessionEngine() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void DebuggerEngine::watchPoint(const QPoint &)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::fetchDisassembler(Internal::DisassemblerViewAgent *)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::activateFrame(int)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::reloadModules()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::examineModules()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::loadSymbols(const QString &)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::loadAllSymbols()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::requestModuleSymbols(const QString &)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::reloadRegisters()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::reloadSourceFiles()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::reloadFullStack()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::addOptionPages(QList<Core::IOptionsPage*> *) const
|
||||
{
|
||||
}
|
||||
|
||||
unsigned DebuggerEngine::debuggerCapabilities() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool DebuggerEngine::isSynchronous() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QByteArray DebuggerEngine::qtNamespace() const
|
||||
{
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
void DebuggerEngine::createSnapshot()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::updateAll()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::attemptBreakpointSynchronization()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::selectThread(int)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::assignValueInDebugger(const QString &, const QString &)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::detachDebugger()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeStep()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeStepOut()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeNext()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeStepI()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeNextI()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeReturn()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::continueInferior()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::interruptInferior()
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeRunToLine(const QString &, int)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeRunToFunction(const QString &)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeJumpToLine(const QString &, int)
|
||||
{
|
||||
}
|
||||
|
||||
void DebuggerEngine::executeDebuggerCommand(const QString &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool DebuggerEngine::isDying() const
|
||||
{
|
||||
return targetState() == DebuggerFinished;
|
||||
}
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
#include "debuggerengine.moc"
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace Debugger {
|
||||
|
||||
class DebuggerRunControl;
|
||||
class DebuggerPlugin;
|
||||
class DebuggerEnginePrivate;
|
||||
class QmlCppEngine;
|
||||
|
||||
class DEBUGGER_EXPORT DebuggerStartParameters
|
||||
{
|
||||
@@ -128,13 +130,12 @@ class SourceFilesHandler;
|
||||
class ThreadsHandler;
|
||||
class WatchHandler;
|
||||
|
||||
class DebuggerEnginePrivate;
|
||||
|
||||
struct WatchUpdateFlags
|
||||
{
|
||||
WatchUpdateFlags() : tryIncremental(false) {}
|
||||
bool tryIncremental;
|
||||
};
|
||||
} // namespace Internal
|
||||
|
||||
// FIXME: DEBUGGER_EXPORT?
|
||||
class DEBUGGER_EXPORT DebuggerEngine : public QObject
|
||||
@@ -142,78 +143,72 @@ class DEBUGGER_EXPORT DebuggerEngine : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DebuggerEngine(const DebuggerStartParameters &sp);
|
||||
explicit DebuggerEngine(const DebuggerStartParameters &sp);
|
||||
virtual ~DebuggerEngine();
|
||||
|
||||
virtual void setToolTipExpression(const QPoint & /* mousePos */,
|
||||
TextEditor::ITextEditor * /* editor */, int /* cursorPos */) {}
|
||||
virtual void setToolTipExpression(const QPoint & mousePos,
|
||||
TextEditor::ITextEditor * editor, int cursorPos);
|
||||
void initializeFromTemplate(DebuggerEngine *other);
|
||||
|
||||
virtual void updateWatchData(const WatchData & /* data */,
|
||||
const WatchUpdateFlags & /* flags */ = WatchUpdateFlags()) {}
|
||||
virtual void updateWatchData(const Internal::WatchData &data,
|
||||
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
|
||||
void startDebugger(DebuggerRunControl *runControl);
|
||||
virtual bool isSessionEngine() const { return false; }
|
||||
virtual bool isSessionEngine() const;
|
||||
|
||||
virtual void watchPoint(const QPoint &) {}
|
||||
virtual void fetchMemory(MemoryViewAgent *, QObject *,
|
||||
quint64 addr, quint64 length);
|
||||
virtual void fetchDisassembler(DisassemblerViewAgent *) {}
|
||||
virtual void activateFrame(int index) { Q_UNUSED(index); }
|
||||
virtual void watchPoint(const QPoint &);
|
||||
virtual void fetchMemory(Internal::MemoryViewAgent *, QObject *,
|
||||
quint64 addr, quint64 length);
|
||||
virtual void fetchDisassembler(Internal::DisassemblerViewAgent *);
|
||||
virtual void activateFrame(int index);
|
||||
|
||||
virtual void reloadModules() {}
|
||||
virtual void examineModules() {}
|
||||
virtual void loadSymbols(const QString &moduleName)
|
||||
{ Q_UNUSED(moduleName); }
|
||||
virtual void loadAllSymbols() {}
|
||||
virtual void requestModuleSymbols(const QString &moduleName)
|
||||
{ Q_UNUSED(moduleName); }
|
||||
virtual void reloadModules();
|
||||
virtual void examineModules();
|
||||
virtual void loadSymbols(const QString &moduleName);
|
||||
virtual void loadAllSymbols();
|
||||
virtual void requestModuleSymbols(const QString &moduleName);
|
||||
|
||||
virtual void reloadRegisters() {}
|
||||
virtual void reloadSourceFiles() {}
|
||||
virtual void reloadFullStack() {}
|
||||
virtual void reloadRegisters();
|
||||
virtual void reloadSourceFiles();
|
||||
virtual void reloadFullStack();
|
||||
|
||||
virtual void setRegisterValue(int regnr, const QString &value);
|
||||
virtual void addOptionPages(QList<Core::IOptionsPage*> *) const {}
|
||||
virtual unsigned debuggerCapabilities() const { return 0; }
|
||||
virtual void addOptionPages(QList<Core::IOptionsPage*> *) const;
|
||||
virtual unsigned debuggerCapabilities() const;
|
||||
|
||||
virtual bool isSynchronous() const { return false; }
|
||||
virtual QByteArray qtNamespace() const { return QByteArray(); }
|
||||
virtual bool isSynchronous() const;
|
||||
virtual QByteArray qtNamespace() const;
|
||||
|
||||
virtual void createSnapshot() {}
|
||||
virtual void updateAll() {}
|
||||
virtual void createSnapshot();
|
||||
virtual void updateAll();
|
||||
|
||||
virtual void attemptBreakpointSynchronization() {}
|
||||
virtual void selectThread(int index) { Q_UNUSED(index); }
|
||||
virtual void attemptBreakpointSynchronization();
|
||||
virtual void selectThread(int index);
|
||||
|
||||
virtual void assignValueInDebugger(const QString &expr, const QString &value)
|
||||
{ Q_UNUSED(expr); Q_UNUSED(value); }
|
||||
virtual void assignValueInDebugger(const QString &expr, const QString &value);
|
||||
|
||||
// Convenience
|
||||
static QMessageBox *showMessageBox
|
||||
(int icon, const QString &title, const QString &text, int buttons = 0);
|
||||
|
||||
protected:
|
||||
virtual void detachDebugger() {}
|
||||
virtual void executeStep() {}
|
||||
virtual void executeStepOut() {}
|
||||
virtual void executeNext() {}
|
||||
virtual void executeStepI() {}
|
||||
virtual void executeNextI() {}
|
||||
virtual void executeReturn() {}
|
||||
virtual void detachDebugger();
|
||||
virtual void executeStep();
|
||||
virtual void executeStepOut() ;
|
||||
virtual void executeNext();
|
||||
virtual void executeStepI();
|
||||
virtual void executeNextI();
|
||||
virtual void executeReturn();
|
||||
|
||||
virtual void continueInferior() {}
|
||||
virtual void interruptInferior() {}
|
||||
virtual void continueInferior();
|
||||
virtual void interruptInferior();
|
||||
|
||||
virtual void requestInterruptInferior();
|
||||
|
||||
virtual void executeRunToLine(const QString &fileName, int lineNumber)
|
||||
{ Q_UNUSED(fileName); Q_UNUSED(lineNumber); }
|
||||
virtual void executeRunToFunction(const QString &functionName)
|
||||
{ Q_UNUSED(functionName); }
|
||||
virtual void executeJumpToLine(const QString &fileName, int lineNumber)
|
||||
{ Q_UNUSED(fileName); Q_UNUSED(lineNumber); }
|
||||
virtual void executeDebuggerCommand(const QString &command)
|
||||
{ Q_UNUSED(command); }
|
||||
virtual void executeRunToLine(const QString &fileName, int lineNumber);
|
||||
|
||||
virtual void executeRunToFunction(const QString &functionName);
|
||||
virtual void executeJumpToLine(const QString &fileName, int lineNumber);
|
||||
virtual void executeDebuggerCommand(const QString &command);
|
||||
|
||||
virtual void frameUp();
|
||||
virtual void frameDown();
|
||||
@@ -223,13 +218,13 @@ public:
|
||||
const DebuggerStartParameters &startParameters() const;
|
||||
DebuggerStartParameters &startParameters();
|
||||
|
||||
ModulesHandler *modulesHandler() const;
|
||||
BreakHandler *breakHandler() const;
|
||||
RegisterHandler *registerHandler() const;
|
||||
StackHandler *stackHandler() const;
|
||||
ThreadsHandler *threadsHandler() const;
|
||||
WatchHandler *watchHandler() const;
|
||||
SourceFilesHandler *sourceFilesHandler() const;
|
||||
Internal::ModulesHandler *modulesHandler() const;
|
||||
Internal::BreakHandler *breakHandler() const;
|
||||
Internal::RegisterHandler *registerHandler() const;
|
||||
Internal::StackHandler *stackHandler() const;
|
||||
Internal::ThreadsHandler *threadsHandler() const;
|
||||
Internal::WatchHandler *watchHandler() const;
|
||||
Internal::SourceFilesHandler *sourceFilesHandler() const;
|
||||
|
||||
virtual QAbstractItemModel *commandModel() const;
|
||||
virtual QAbstractItemModel *modulesModel() const;
|
||||
@@ -248,7 +243,7 @@ public:
|
||||
void handleStartFailed();
|
||||
bool debuggerActionsEnabled() const;
|
||||
static bool debuggerActionsEnabled(DebuggerState state);
|
||||
void showModuleSymbols(const QString &moduleName, const Symbols &symbols);
|
||||
void showModuleSymbols(const QString &moduleName, const Internal::Symbols &symbols);
|
||||
|
||||
void breakByFunction(const QString &functionName);
|
||||
void breakByFunctionMain();
|
||||
@@ -261,7 +256,7 @@ public:
|
||||
DebuggerState state() const;
|
||||
DebuggerState lastGoodState() const;
|
||||
DebuggerState targetState() const;
|
||||
bool isDying() const { return targetState() == DebuggerFinished; }
|
||||
bool isDying() const;
|
||||
|
||||
// Dumper stuff (common to cdb and gdb).
|
||||
bool qtDumperLibraryEnabled() const;
|
||||
@@ -285,7 +280,7 @@ public:
|
||||
void resetLocation();
|
||||
void openFile(const QString &fileName, int lineNumber = -1);
|
||||
virtual void gotoLocation(const QString &fileName, int lineNumber, bool setMarker);
|
||||
virtual void gotoLocation(const StackFrame &frame, bool setMarker);
|
||||
virtual void gotoLocation(const Internal::StackFrame &frame, bool setMarker);
|
||||
virtual void quitDebugger(); // called by DebuggerRunControl
|
||||
|
||||
signals:
|
||||
@@ -353,7 +348,6 @@ private:
|
||||
DebuggerEnginePrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGER_DEBUGGERENGINE_H
|
||||
|
||||
@@ -50,13 +50,12 @@ class RunControl;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
class DebuggerEngine;
|
||||
class DebuggerPluginPrivate;
|
||||
class DebuggerRunControl;
|
||||
class DebuggerStartParameters;
|
||||
|
||||
namespace Internal {
|
||||
class DebuggerEngine;
|
||||
class DebuggerListener;
|
||||
}
|
||||
|
||||
@@ -74,13 +73,13 @@ public:
|
||||
ProjectExplorer::RunConfiguration *rc = 0);
|
||||
static void startDebugger(ProjectExplorer::RunControl *runControl);
|
||||
static void displayDebugger(ProjectExplorer::RunControl *runControl);
|
||||
static void displayDebugger(Internal::DebuggerEngine *engine, bool updateEngine = true);
|
||||
static void displayDebugger(DebuggerEngine *engine, bool updateEngine = true);
|
||||
|
||||
QVariant sessionValue(const QString &name);
|
||||
void setSessionValue(const QString &name, const QVariant &value);
|
||||
QVariant configValue(const QString &name) const;
|
||||
void setConfigValue(const QString &name, const QVariant &value);
|
||||
void updateState(Internal::DebuggerEngine *engine);
|
||||
void updateState(DebuggerEngine *engine);
|
||||
|
||||
QIcon locationMarkIcon() const;
|
||||
void activateDebugMode();
|
||||
@@ -99,7 +98,7 @@ public slots:
|
||||
void showMessage(const QString &msg, int channel, int timeout = -1);
|
||||
|
||||
private:
|
||||
friend class Internal::DebuggerEngine;
|
||||
friend class DebuggerEngine;
|
||||
friend class DebuggerPluginPrivate;
|
||||
friend class DebuggerRunControl;
|
||||
|
||||
@@ -116,7 +115,7 @@ private:
|
||||
|
||||
// This contains per-session data like breakpoints and watched
|
||||
// expression. It serves as a template for new engine instantiations.
|
||||
Internal::DebuggerEngine *sessionTemplate();
|
||||
DebuggerEngine *sessionTemplate();
|
||||
|
||||
QMessageBox *showMessageBox(int icon, const QString &title,
|
||||
const QString &text, int buttons = 0);
|
||||
|
||||
@@ -404,22 +404,22 @@ void DebuggerRunControl::createEngine(const DebuggerStartParameters &startParams
|
||||
initGdbEngine(qobject_cast<Internal::GdbEngine *>(m_engine));
|
||||
break;
|
||||
case ScriptEngineType:
|
||||
m_engine = createScriptEngine(sp);
|
||||
m_engine = Internal::createScriptEngine(sp);
|
||||
break;
|
||||
case CdbEngineType:
|
||||
m_engine = createCdbEngine(sp);
|
||||
m_engine = Internal::createCdbEngine(sp);
|
||||
break;
|
||||
case PdbEngineType:
|
||||
m_engine = createPdbEngine(sp);
|
||||
m_engine = Internal::createPdbEngine(sp);
|
||||
break;
|
||||
case TcfEngineType:
|
||||
m_engine = createTcfEngine(sp);
|
||||
m_engine = Internal::createTcfEngine(sp);
|
||||
break;
|
||||
case QmlEngineType:
|
||||
m_engine = createQmlEngine(sp);
|
||||
m_engine = Internal::createQmlEngine(sp);
|
||||
break;
|
||||
case QmlCppEngineType:
|
||||
m_engine = createQmlCppEngine(sp);
|
||||
m_engine = Internal::createQmlCppEngine(sp);
|
||||
if (Internal::GdbEngine *embeddedGdbEngine = gdbEngine())
|
||||
initGdbEngine(embeddedGdbEngine);
|
||||
break;
|
||||
@@ -608,7 +608,7 @@ DebuggerState DebuggerRunControl::state() const
|
||||
return m_engine->state();
|
||||
}
|
||||
|
||||
Internal::DebuggerEngine *DebuggerRunControl::engine()
|
||||
DebuggerEngine *DebuggerRunControl::engine()
|
||||
{
|
||||
QTC_ASSERT(m_engine, /**/);
|
||||
return m_engine;
|
||||
@@ -620,7 +620,7 @@ Internal::GdbEngine *DebuggerRunControl::gdbEngine() const
|
||||
if (GdbEngine *gdbEngine = qobject_cast<GdbEngine *>(m_engine))
|
||||
return gdbEngine;
|
||||
if (QmlCppEngine * const qmlEngine = qobject_cast<QmlCppEngine *>(m_engine))
|
||||
if (GdbEngine *embeddedGdbEngine = qobject_cast<GdbEngine *>(qmlEngine->cppEngine()))
|
||||
if (Internal::GdbEngine *embeddedGdbEngine = qobject_cast<GdbEngine *>(qmlEngine->cppEngine()))
|
||||
return embeddedGdbEngine;
|
||||
return 0;
|
||||
}
|
||||
@@ -657,4 +657,14 @@ void DebuggerRunControl::remoteGdbHandleSetupFailed(const QString &message)
|
||||
QTC_ASSERT(false, /* */ );
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerRunControl::emitAddToOutputWindow(const QString &line, bool onStdErr)
|
||||
{
|
||||
emit addToOutputWindow(this, line, onStdErr);
|
||||
}
|
||||
|
||||
void DebuggerRunControl::emitAppendMessage(const QString &m, bool isError)
|
||||
{
|
||||
emit appendMessage(this, m, isError);
|
||||
}
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -39,15 +39,13 @@ namespace ProjectExplorer {
|
||||
class Environment;
|
||||
}
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
|
||||
class DebuggerEngine;
|
||||
class DebuggerRunControl;
|
||||
class QmlEngine;
|
||||
class DebuggerStartParameters;
|
||||
|
||||
namespace Internal {
|
||||
class DebuggerEngine;
|
||||
class QmlEngine;
|
||||
class GdbEngine;
|
||||
class AbstractGdbAdapter;
|
||||
}
|
||||
@@ -111,7 +109,7 @@ public:
|
||||
RunConfiguration *runConfiguration() const { return m_myRunConfiguration.data(); }
|
||||
|
||||
DebuggerState state() const;
|
||||
Internal::DebuggerEngine *engine();
|
||||
DebuggerEngine *engine();
|
||||
|
||||
void showMessage(const QString &msg, int channel);
|
||||
|
||||
@@ -126,6 +124,10 @@ public:
|
||||
signals:
|
||||
void gdbAdapterRequestSetup();
|
||||
|
||||
public slots:
|
||||
void emitAddToOutputWindow(const QString &line, bool onStdErr);
|
||||
void emitAppendMessage(const QString &, bool isError);
|
||||
|
||||
private slots:
|
||||
void handleFinished();
|
||||
|
||||
@@ -139,14 +141,13 @@ private:
|
||||
Internal::GdbEngine *gdbEngine() const;
|
||||
Internal::AbstractGdbAdapter *gdbAdapter() const;
|
||||
|
||||
Internal::DebuggerEngine *m_engine;
|
||||
DebuggerEngine *m_engine;
|
||||
const QWeakPointer<RunConfiguration> m_myRunConfiguration;
|
||||
bool m_running;
|
||||
bool m_started;
|
||||
DebuggerEngineType m_enabledEngines;
|
||||
QString m_errorMessage;
|
||||
QString m_settingsIdHint;
|
||||
friend class Internal::QmlEngine;
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -82,7 +82,7 @@ enum DebuggingHelperState
|
||||
};
|
||||
|
||||
|
||||
class DEBUGGER_EXPORT GdbEngine : public DebuggerEngine
|
||||
class DEBUGGER_EXPORT GdbEngine : public Debugger::DebuggerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -114,7 +114,8 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
|
||||
{
|
||||
PRECONDITION;
|
||||
if (response.resultClass == GdbResultDone) {
|
||||
bool partial = response.cookie.toBool();
|
||||
const bool partial = response.cookie.toBool();
|
||||
Q_UNUSED(partial);
|
||||
//qDebug() << "READING " << (partial ? "PARTIAL" : "FULL");
|
||||
QByteArray out = response.data.findChild("consolestreamoutput").data();
|
||||
while (out.endsWith(' ') || out.endsWith('\n'))
|
||||
|
||||
@@ -40,9 +40,11 @@ QT_END_NAMESPACE
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class ModulesModel;
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -33,82 +33,101 @@
|
||||
|
||||
#include "debuggerengine.h"
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
struct QmlAdapterPrivate {
|
||||
explicit QmlAdapterPrivate(DebuggerEngine *engine, QmlAdapter *q);
|
||||
|
||||
QWeakPointer<DebuggerEngine> m_engine;
|
||||
Internal::QmlDebuggerClient *m_qmlClient;
|
||||
QDeclarativeEngineDebug *m_mainClient;
|
||||
|
||||
QTimer *m_connectionTimer;
|
||||
int m_connectionAttempts;
|
||||
int m_maxConnectionAttempts;
|
||||
QDeclarativeDebugConnection *m_conn;
|
||||
};
|
||||
|
||||
QmlAdapterPrivate::QmlAdapterPrivate(DebuggerEngine *engine, QmlAdapter *q) :
|
||||
m_engine(engine)
|
||||
, m_qmlClient(0)
|
||||
, m_mainClient(0)
|
||||
, m_connectionTimer(new QTimer(q))
|
||||
, m_connectionAttempts(0)
|
||||
, m_conn(0)
|
||||
{
|
||||
}
|
||||
|
||||
QmlAdapter::QmlAdapter(DebuggerEngine *engine, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_engine(engine)
|
||||
, m_qmlClient(0)
|
||||
, m_mainClient(0)
|
||||
, m_connectionTimer(new QTimer(this))
|
||||
, m_connectionAttempts(0)
|
||||
, m_conn(0)
|
||||
|
||||
: QObject(parent), d(new QmlAdapterPrivate(engine, this))
|
||||
{
|
||||
d->m_connectionTimer->setInterval(200);
|
||||
connect(d->m_connectionTimer, SIGNAL(timeout()), SLOT(pollInferior()));
|
||||
}
|
||||
|
||||
QmlAdapter::~QmlAdapter()
|
||||
{
|
||||
m_connectionTimer->setInterval(200);
|
||||
connect(m_connectionTimer, SIGNAL(timeout()), SLOT(pollInferior()));
|
||||
}
|
||||
|
||||
void QmlAdapter::beginConnection()
|
||||
{
|
||||
m_connectionAttempts = 0;
|
||||
m_connectionTimer->start();
|
||||
d->m_connectionAttempts = 0;
|
||||
d->m_connectionTimer->start();
|
||||
}
|
||||
|
||||
void QmlAdapter::pauseConnection()
|
||||
{
|
||||
m_connectionTimer->stop();
|
||||
d->m_connectionTimer->stop();
|
||||
}
|
||||
|
||||
void QmlAdapter::closeConnection()
|
||||
{
|
||||
if (m_connectionTimer->isActive()) {
|
||||
m_connectionTimer->stop();
|
||||
if (d->m_connectionTimer->isActive()) {
|
||||
d->m_connectionTimer->stop();
|
||||
} else {
|
||||
if (m_conn) {
|
||||
m_conn->disconnectFromHost();
|
||||
if (d->m_conn) {
|
||||
d->m_conn->disconnectFromHost();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QmlAdapter::pollInferior()
|
||||
{
|
||||
++m_connectionAttempts;
|
||||
++d->m_connectionAttempts;
|
||||
|
||||
if (connectToViewer()) {
|
||||
m_connectionTimer->stop();
|
||||
m_connectionAttempts = 0;
|
||||
} else if (m_connectionAttempts == m_maxConnectionAttempts) {
|
||||
d->m_connectionTimer->stop();
|
||||
d->m_connectionAttempts = 0;
|
||||
} else if (d->m_connectionAttempts == d->m_maxConnectionAttempts) {
|
||||
emit connectionStartupFailed();
|
||||
m_connectionTimer->stop();
|
||||
m_connectionAttempts = 0;
|
||||
d->m_connectionTimer->stop();
|
||||
d->m_connectionAttempts = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool QmlAdapter::connectToViewer()
|
||||
{
|
||||
if (m_engine.isNull() || (m_conn && m_conn->state() != QAbstractSocket::UnconnectedState))
|
||||
if (d->m_engine.isNull() || (d->m_conn && d->m_conn->state() != QAbstractSocket::UnconnectedState))
|
||||
return false;
|
||||
|
||||
m_conn = new QDeclarativeDebugConnection(this);
|
||||
connect(m_conn, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
|
||||
d->m_conn = new QDeclarativeDebugConnection(this);
|
||||
connect(d->m_conn, SIGNAL(stateChanged(QAbstractSocket::SocketState)),
|
||||
SLOT(connectionStateChanged()));
|
||||
connect(m_conn, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
connect(d->m_conn, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
SLOT(connectionErrorOccurred(QAbstractSocket::SocketError)));
|
||||
|
||||
QString address = m_engine.data()->startParameters().qmlServerAddress;
|
||||
QString port = QString::number(m_engine.data()->startParameters().qmlServerPort);
|
||||
QString address = d->m_engine.data()->startParameters().qmlServerAddress;
|
||||
QString port = QString::number(d->m_engine.data()->startParameters().qmlServerPort);
|
||||
showConnectionStatusMessage(tr("Connect to debug server %1:%2").arg(address).arg(port));
|
||||
m_conn->connectToHost(m_engine.data()->startParameters().qmlServerAddress,
|
||||
m_engine.data()->startParameters().qmlServerPort);
|
||||
d->m_conn->connectToHost(d->m_engine.data()->startParameters().qmlServerAddress,
|
||||
d->m_engine.data()->startParameters().qmlServerPort);
|
||||
|
||||
|
||||
// blocks until connected; if no connection is available, will fail immediately
|
||||
if (!m_conn->waitForConnected())
|
||||
if (!d->m_conn->waitForConnected())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -117,7 +136,7 @@ bool QmlAdapter::connectToViewer()
|
||||
void QmlAdapter::connectionErrorOccurred(QAbstractSocket::SocketError socketError)
|
||||
{
|
||||
showConnectionErrorMessage(tr("Error: (%1) %2", "%1=error code, %2=error message")
|
||||
.arg(m_conn->error()).arg(m_conn->errorString()));
|
||||
.arg(d->m_conn->error()).arg(d->m_conn->errorString()));
|
||||
|
||||
// this is only an error if we are already connected and something goes wrong.
|
||||
if (isConnected())
|
||||
@@ -126,7 +145,7 @@ void QmlAdapter::connectionErrorOccurred(QAbstractSocket::SocketError socketErro
|
||||
|
||||
void QmlAdapter::connectionStateChanged()
|
||||
{
|
||||
switch (m_conn->state()) {
|
||||
switch (d->m_conn->state()) {
|
||||
case QAbstractSocket::UnconnectedState:
|
||||
{
|
||||
showConnectionStatusMessage(tr("disconnected.\n\n"));
|
||||
@@ -144,8 +163,8 @@ void QmlAdapter::connectionStateChanged()
|
||||
{
|
||||
showConnectionStatusMessage(tr("connected.\n"));
|
||||
|
||||
if (!m_mainClient) {
|
||||
m_mainClient = new QDeclarativeEngineDebug(m_conn, this);
|
||||
if (!d->m_mainClient) {
|
||||
d->m_mainClient = new QDeclarativeEngineDebug(d->m_conn, this);
|
||||
}
|
||||
|
||||
createDebuggerClient();
|
||||
@@ -164,29 +183,29 @@ void QmlAdapter::connectionStateChanged()
|
||||
|
||||
void QmlAdapter::createDebuggerClient()
|
||||
{
|
||||
m_qmlClient = new QmlDebuggerClient(m_conn);
|
||||
d->m_qmlClient = new Internal::QmlDebuggerClient(d->m_conn);
|
||||
|
||||
connect(m_engine.data(), SIGNAL(sendMessage(QByteArray)),
|
||||
m_qmlClient, SLOT(slotSendMessage(QByteArray)));
|
||||
connect(m_qmlClient, SIGNAL(messageWasReceived(QByteArray)),
|
||||
m_engine.data(), SLOT(messageReceived(QByteArray)));
|
||||
connect(d->m_engine.data(), SIGNAL(sendMessage(QByteArray)),
|
||||
d->m_qmlClient, SLOT(slotSendMessage(QByteArray)));
|
||||
connect(d->m_qmlClient, SIGNAL(messageWasReceived(QByteArray)),
|
||||
d->m_engine.data(), SLOT(messageReceived(QByteArray)));
|
||||
|
||||
//engine->startSuccessful(); // FIXME: AAA: port to new debugger states
|
||||
}
|
||||
|
||||
bool QmlAdapter::isConnected() const
|
||||
{
|
||||
return m_conn && m_qmlClient && m_conn->state() == QAbstractSocket::ConnectedState;
|
||||
return d->m_conn && d->m_qmlClient && d->m_conn->state() == QAbstractSocket::ConnectedState;
|
||||
}
|
||||
|
||||
bool QmlAdapter::isUnconnected() const
|
||||
{
|
||||
return !m_conn || m_conn->state() == QAbstractSocket::UnconnectedState;
|
||||
return !d->m_conn || d->m_conn->state() == QAbstractSocket::UnconnectedState;
|
||||
}
|
||||
|
||||
QDeclarativeEngineDebug *QmlAdapter::client() const
|
||||
{
|
||||
return m_mainClient;
|
||||
return d->m_mainClient;
|
||||
}
|
||||
|
||||
QDeclarativeDebugConnection *QmlAdapter::connection() const
|
||||
@@ -194,29 +213,28 @@ QDeclarativeDebugConnection *QmlAdapter::connection() const
|
||||
if (!isConnected())
|
||||
return 0;
|
||||
|
||||
return m_conn;
|
||||
return d->m_conn;
|
||||
}
|
||||
|
||||
void QmlAdapter::showConnectionStatusMessage(const QString &message)
|
||||
{
|
||||
if (!m_engine.isNull())
|
||||
m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogStatus);
|
||||
if (!d->m_engine.isNull())
|
||||
d->m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogStatus);
|
||||
}
|
||||
|
||||
void QmlAdapter::showConnectionErrorMessage(const QString &message)
|
||||
{
|
||||
if (!m_engine.isNull())
|
||||
m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogError);
|
||||
if (!d->m_engine.isNull())
|
||||
d->m_engine.data()->showMessage(QLatin1String("QmlJSDebugger: ") + message, LogError);
|
||||
}
|
||||
|
||||
void QmlAdapter::setMaxConnectionAttempts(int maxAttempts)
|
||||
{
|
||||
m_maxConnectionAttempts = maxAttempts;
|
||||
d->m_maxConnectionAttempts = maxAttempts;
|
||||
}
|
||||
void QmlAdapter::setConnectionAttemptInterval(int interval)
|
||||
{
|
||||
m_connectionTimer->setInterval(interval);
|
||||
d->m_connectionTimer->setInterval(interval);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -30,24 +30,36 @@
|
||||
#ifndef QMLADAPTER_H
|
||||
#define QMLADAPTER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QWeakPointer>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
#include "qmljsprivateapi.h"
|
||||
#include "debugger_global.h"
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||
#include <QtNetwork/QAbstractSocket>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QmlJsDebugClient {
|
||||
class QDeclarativeEngineDebug;
|
||||
class QDeclarativeDebugConnection;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
class DebuggerEngine;
|
||||
class QmlDebuggerClient;
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
class QmlDebuggerClient;
|
||||
} // namespace Internal
|
||||
|
||||
struct QmlAdapterPrivate;
|
||||
class DEBUGGER_EXPORT QmlAdapter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QmlAdapter(DebuggerEngine *engine, QObject *parent = 0);
|
||||
virtual ~QmlAdapter();
|
||||
|
||||
void beginConnection();
|
||||
void pauseConnection();
|
||||
void closeConnection();
|
||||
@@ -55,8 +67,8 @@ public:
|
||||
bool isConnected() const;
|
||||
bool isUnconnected() const;
|
||||
|
||||
QDeclarativeEngineDebug *client() const;
|
||||
QDeclarativeDebugConnection *connection() const;
|
||||
QmlJsDebugClient::QDeclarativeEngineDebug *client() const;
|
||||
QmlJsDebugClient::QDeclarativeDebugConnection *connection() const;
|
||||
|
||||
// TODO move to private API b/w engine and adapter
|
||||
void setMaxConnectionAttempts(int maxAttempts);
|
||||
@@ -81,19 +93,9 @@ private:
|
||||
void showConnectionErrorMessage(const QString &message);
|
||||
|
||||
private:
|
||||
QWeakPointer<DebuggerEngine> m_engine;
|
||||
QmlDebuggerClient *m_qmlClient;
|
||||
QDeclarativeEngineDebug *m_mainClient;
|
||||
|
||||
QTimer *m_connectionTimer;
|
||||
int m_connectionAttempts;
|
||||
int m_maxConnectionAttempts;
|
||||
|
||||
QDeclarativeDebugConnection *m_conn;
|
||||
|
||||
QScopedPointer<QmlAdapterPrivate> d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // QMLADAPTER_H
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
const int ConnectionWaitTimeMs = 5000;
|
||||
|
||||
namespace Internal {
|
||||
DebuggerEngine *createCdbEngine(const DebuggerStartParameters &);
|
||||
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &);
|
||||
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &);
|
||||
@@ -21,29 +22,49 @@ DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp)
|
||||
{
|
||||
return new QmlCppEngine(sp);
|
||||
}
|
||||
} // namespace Internal
|
||||
|
||||
QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp)
|
||||
: DebuggerEngine(sp)
|
||||
, m_shutdownOk(true)
|
||||
struct QmlCppEnginePrivate {
|
||||
QmlCppEnginePrivate();
|
||||
|
||||
QmlEngine *m_qmlEngine;
|
||||
DebuggerEngine *m_cppEngine;
|
||||
DebuggerEngine *m_activeEngine;
|
||||
bool m_shutdownOk;
|
||||
bool m_shutdownDeferred;
|
||||
bool m_shutdownDone;
|
||||
bool m_isInitialStartup;
|
||||
};
|
||||
|
||||
QmlCppEnginePrivate::QmlCppEnginePrivate() :
|
||||
m_qmlEngine(0),
|
||||
m_cppEngine(0),
|
||||
m_activeEngine(0),
|
||||
m_shutdownOk(true)
|
||||
, m_shutdownDeferred(false)
|
||||
, m_shutdownDone(false)
|
||||
, m_isInitialStartup(true)
|
||||
{
|
||||
m_qmlEngine = qobject_cast<QmlEngine*>(createQmlEngine(sp));
|
||||
m_qmlEngine->setAttachToRunningExternalApp(true);
|
||||
}
|
||||
|
||||
QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp)
|
||||
: DebuggerEngine(sp), d(new QmlCppEnginePrivate)
|
||||
{
|
||||
d->m_qmlEngine = qobject_cast<QmlEngine*>(Internal::createQmlEngine(sp));
|
||||
d->m_qmlEngine->setAttachToRunningExternalApp(true);
|
||||
|
||||
if (startParameters().cppEngineType == GdbEngineType) {
|
||||
m_cppEngine = createGdbEngine(sp);
|
||||
d->m_cppEngine = Internal::createGdbEngine(sp);
|
||||
} else {
|
||||
m_cppEngine = createCdbEngine(sp);
|
||||
d->m_cppEngine = Internal::createCdbEngine(sp);
|
||||
}
|
||||
|
||||
m_cppEngine->setRunInWrapperEngine(true);
|
||||
m_qmlEngine->setRunInWrapperEngine(true);
|
||||
d->m_cppEngine->setRunInWrapperEngine(true);
|
||||
d->m_qmlEngine->setRunInWrapperEngine(true);
|
||||
|
||||
m_activeEngine = m_cppEngine;
|
||||
connect(m_cppEngine, SIGNAL(stateChanged(DebuggerState)), SLOT(masterEngineStateChanged(DebuggerState)));
|
||||
connect(m_qmlEngine, SIGNAL(stateChanged(DebuggerState)), SLOT(slaveEngineStateChanged(DebuggerState)));
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
connect(d->m_cppEngine, SIGNAL(stateChanged(DebuggerState)), SLOT(masterEngineStateChanged(DebuggerState)));
|
||||
connect(d->m_qmlEngine, SIGNAL(stateChanged(DebuggerState)), SLOT(slaveEngineStateChanged(DebuggerState)));
|
||||
|
||||
Core::EditorManager *em = Core::EditorManager::instance();
|
||||
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)), SLOT(editorChanged(Core::IEditor*)));
|
||||
@@ -51,10 +72,10 @@ QmlCppEngine::QmlCppEngine(const DebuggerStartParameters &sp)
|
||||
|
||||
QmlCppEngine::~QmlCppEngine()
|
||||
{
|
||||
delete m_qmlEngine;
|
||||
delete m_cppEngine;
|
||||
m_qmlEngine = 0;
|
||||
m_cppEngine = 0;
|
||||
delete d->m_qmlEngine;
|
||||
delete d->m_cppEngine;
|
||||
d->m_qmlEngine = 0;
|
||||
d->m_cppEngine = 0;
|
||||
}
|
||||
|
||||
void QmlCppEngine::editorChanged(Core::IEditor *editor)
|
||||
@@ -72,274 +93,274 @@ void QmlCppEngine::editorChanged(Core::IEditor *editor)
|
||||
|
||||
void QmlCppEngine::setActiveEngine(DebuggerLanguage language)
|
||||
{
|
||||
DebuggerEngine *previousEngine = m_activeEngine;
|
||||
DebuggerEngine *previousEngine = d->m_activeEngine;
|
||||
bool updateEngine = false;
|
||||
QString engineName;
|
||||
|
||||
if (language == CppLanguage) {
|
||||
engineName = QLatin1String("C++");
|
||||
m_activeEngine = m_cppEngine;
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
// don't update cpp engine - at least gdb will stop temporarily,
|
||||
// which is not nice when you're just switching files.
|
||||
} else if (language == QmlLanguage) {
|
||||
engineName = QLatin1String("QML");
|
||||
m_activeEngine = m_qmlEngine;
|
||||
d->m_activeEngine = d->m_qmlEngine;
|
||||
updateEngine = true;
|
||||
}
|
||||
if (previousEngine != m_activeEngine) {
|
||||
if (previousEngine != d->m_activeEngine) {
|
||||
showStatusMessage(tr("%1 debugger activated").arg(engineName));
|
||||
plugin()->displayDebugger(m_activeEngine, updateEngine);
|
||||
plugin()->displayDebugger(d->m_activeEngine, updateEngine);
|
||||
}
|
||||
}
|
||||
|
||||
void QmlCppEngine::setToolTipExpression(const QPoint & mousePos,
|
||||
TextEditor::ITextEditor *editor, int cursorPos)
|
||||
{
|
||||
m_activeEngine->setToolTipExpression(mousePos, editor, cursorPos);
|
||||
d->m_activeEngine->setToolTipExpression(mousePos, editor, cursorPos);
|
||||
}
|
||||
|
||||
void QmlCppEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags)
|
||||
void QmlCppEngine::updateWatchData(const Internal::WatchData &data, const Internal::WatchUpdateFlags &flags)
|
||||
{
|
||||
m_activeEngine->updateWatchData(data, flags);
|
||||
d->m_activeEngine->updateWatchData(data, flags);
|
||||
}
|
||||
|
||||
void QmlCppEngine::watchPoint(const QPoint &point)
|
||||
{
|
||||
m_cppEngine->watchPoint(point);
|
||||
d->m_cppEngine->watchPoint(point);
|
||||
}
|
||||
|
||||
void QmlCppEngine::fetchMemory(MemoryViewAgent *mva, QObject *obj,
|
||||
void QmlCppEngine::fetchMemory(Internal::MemoryViewAgent *mva, QObject *obj,
|
||||
quint64 addr, quint64 length)
|
||||
{
|
||||
m_cppEngine->fetchMemory(mva, obj, addr, length);
|
||||
d->m_cppEngine->fetchMemory(mva, obj, addr, length);
|
||||
}
|
||||
|
||||
void QmlCppEngine::fetchDisassembler(DisassemblerViewAgent *dva)
|
||||
void QmlCppEngine::fetchDisassembler(Internal::DisassemblerViewAgent *dva)
|
||||
{
|
||||
m_cppEngine->fetchDisassembler(dva);
|
||||
d->m_cppEngine->fetchDisassembler(dva);
|
||||
}
|
||||
|
||||
void QmlCppEngine::activateFrame(int index)
|
||||
{
|
||||
m_cppEngine->activateFrame(index);
|
||||
d->m_cppEngine->activateFrame(index);
|
||||
}
|
||||
|
||||
void QmlCppEngine::reloadModules()
|
||||
{
|
||||
m_cppEngine->reloadModules();
|
||||
d->m_cppEngine->reloadModules();
|
||||
}
|
||||
|
||||
void QmlCppEngine::examineModules()
|
||||
{
|
||||
m_cppEngine->examineModules();
|
||||
d->m_cppEngine->examineModules();
|
||||
}
|
||||
|
||||
void QmlCppEngine::loadSymbols(const QString &moduleName)
|
||||
{
|
||||
m_cppEngine->loadSymbols(moduleName);
|
||||
d->m_cppEngine->loadSymbols(moduleName);
|
||||
}
|
||||
|
||||
void QmlCppEngine::loadAllSymbols()
|
||||
{
|
||||
m_cppEngine->loadAllSymbols();
|
||||
d->m_cppEngine->loadAllSymbols();
|
||||
}
|
||||
|
||||
void QmlCppEngine::requestModuleSymbols(const QString &moduleName)
|
||||
{
|
||||
m_cppEngine->requestModuleSymbols(moduleName);
|
||||
d->m_cppEngine->requestModuleSymbols(moduleName);
|
||||
}
|
||||
|
||||
void QmlCppEngine::reloadRegisters()
|
||||
{
|
||||
m_cppEngine->reloadRegisters();
|
||||
d->m_cppEngine->reloadRegisters();
|
||||
}
|
||||
|
||||
void QmlCppEngine::reloadSourceFiles()
|
||||
{
|
||||
m_cppEngine->reloadSourceFiles();
|
||||
d->m_cppEngine->reloadSourceFiles();
|
||||
}
|
||||
|
||||
void QmlCppEngine::reloadFullStack()
|
||||
{
|
||||
m_cppEngine->reloadFullStack();
|
||||
d->m_cppEngine->reloadFullStack();
|
||||
}
|
||||
|
||||
void QmlCppEngine::setRegisterValue(int regnr, const QString &value)
|
||||
{
|
||||
m_cppEngine->setRegisterValue(regnr, value);
|
||||
d->m_cppEngine->setRegisterValue(regnr, value);
|
||||
}
|
||||
|
||||
unsigned QmlCppEngine::debuggerCapabilities() const
|
||||
{
|
||||
// ### this could also be an OR of both engines' capabilities
|
||||
return m_cppEngine->debuggerCapabilities();
|
||||
return d->m_cppEngine->debuggerCapabilities();
|
||||
}
|
||||
|
||||
bool QmlCppEngine::isSynchronous() const
|
||||
{
|
||||
return m_activeEngine->isSynchronous();
|
||||
return d->m_activeEngine->isSynchronous();
|
||||
}
|
||||
|
||||
QByteArray QmlCppEngine::qtNamespace() const
|
||||
{
|
||||
return m_cppEngine->qtNamespace();
|
||||
return d->m_cppEngine->qtNamespace();
|
||||
}
|
||||
|
||||
void QmlCppEngine::createSnapshot()
|
||||
{
|
||||
m_cppEngine->createSnapshot();
|
||||
d->m_cppEngine->createSnapshot();
|
||||
}
|
||||
|
||||
void QmlCppEngine::updateAll()
|
||||
{
|
||||
m_activeEngine->updateAll();
|
||||
d->m_activeEngine->updateAll();
|
||||
}
|
||||
|
||||
void QmlCppEngine::attemptBreakpointSynchronization()
|
||||
{
|
||||
m_cppEngine->attemptBreakpointSynchronization();
|
||||
static_cast<DebuggerEngine*>(m_qmlEngine)->attemptBreakpointSynchronization();
|
||||
d->m_cppEngine->attemptBreakpointSynchronization();
|
||||
static_cast<DebuggerEngine*>(d->m_qmlEngine)->attemptBreakpointSynchronization();
|
||||
}
|
||||
|
||||
void QmlCppEngine::selectThread(int index)
|
||||
{
|
||||
m_cppEngine->selectThread(index);
|
||||
d->m_cppEngine->selectThread(index);
|
||||
}
|
||||
|
||||
void QmlCppEngine::assignValueInDebugger(const QString &expr, const QString &value)
|
||||
{
|
||||
m_activeEngine->assignValueInDebugger(expr, value);
|
||||
d->m_activeEngine->assignValueInDebugger(expr, value);
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::commandModel() const
|
||||
{
|
||||
return m_activeEngine->commandModel();
|
||||
return d->m_activeEngine->commandModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::modulesModel() const
|
||||
{
|
||||
return m_cppEngine->modulesModel();
|
||||
return d->m_cppEngine->modulesModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::breakModel() const
|
||||
{
|
||||
return m_activeEngine->breakModel();
|
||||
return d->m_activeEngine->breakModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::registerModel() const
|
||||
{
|
||||
return m_cppEngine->registerModel();
|
||||
return d->m_cppEngine->registerModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::stackModel() const
|
||||
{
|
||||
return m_activeEngine->stackModel();
|
||||
return d->m_activeEngine->stackModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::threadsModel() const
|
||||
{
|
||||
return m_cppEngine->threadsModel();
|
||||
return d->m_cppEngine->threadsModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::localsModel() const
|
||||
{
|
||||
return m_activeEngine->localsModel();
|
||||
return d->m_activeEngine->localsModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::watchersModel() const
|
||||
{
|
||||
return m_activeEngine->watchersModel();
|
||||
return d->m_activeEngine->watchersModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::returnModel() const
|
||||
{
|
||||
return m_cppEngine->returnModel();
|
||||
return d->m_cppEngine->returnModel();
|
||||
}
|
||||
|
||||
QAbstractItemModel *QmlCppEngine::sourceFilesModel() const
|
||||
{
|
||||
return m_cppEngine->sourceFilesModel();
|
||||
return d->m_cppEngine->sourceFilesModel();
|
||||
}
|
||||
|
||||
void QmlCppEngine::detachDebugger()
|
||||
{
|
||||
m_qmlEngine->detachDebugger();
|
||||
m_cppEngine->detachDebugger();
|
||||
d->m_qmlEngine->detachDebugger();
|
||||
d->m_cppEngine->detachDebugger();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeStep()
|
||||
{
|
||||
m_activeEngine->executeStep();
|
||||
d->m_activeEngine->executeStep();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeStepOut()
|
||||
{
|
||||
m_activeEngine->executeStepOut();
|
||||
d->m_activeEngine->executeStepOut();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeNext()
|
||||
{
|
||||
m_activeEngine->executeNext();
|
||||
d->m_activeEngine->executeNext();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeStepI()
|
||||
{
|
||||
m_activeEngine->executeStepI();
|
||||
d->m_activeEngine->executeStepI();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeNextI()
|
||||
{
|
||||
m_activeEngine->executeNextI();
|
||||
d->m_activeEngine->executeNextI();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeReturn()
|
||||
{
|
||||
m_activeEngine->executeReturn();
|
||||
d->m_activeEngine->executeReturn();
|
||||
}
|
||||
|
||||
void QmlCppEngine::continueInferior()
|
||||
{
|
||||
m_activeEngine->continueInferior();
|
||||
d->m_activeEngine->continueInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::interruptInferior()
|
||||
{
|
||||
m_activeEngine->interruptInferior();
|
||||
d->m_activeEngine->interruptInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::requestInterruptInferior()
|
||||
{
|
||||
m_activeEngine->requestInterruptInferior();
|
||||
d->m_activeEngine->requestInterruptInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeRunToLine(const QString &fileName, int lineNumber)
|
||||
{
|
||||
m_activeEngine->executeRunToLine(fileName, lineNumber);
|
||||
d->m_activeEngine->executeRunToLine(fileName, lineNumber);
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeRunToFunction(const QString &functionName)
|
||||
{
|
||||
m_activeEngine->executeRunToFunction(functionName);
|
||||
d->m_activeEngine->executeRunToFunction(functionName);
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeJumpToLine(const QString &fileName, int lineNumber)
|
||||
{
|
||||
m_activeEngine->executeJumpToLine(fileName, lineNumber);
|
||||
d->m_activeEngine->executeJumpToLine(fileName, lineNumber);
|
||||
}
|
||||
|
||||
void QmlCppEngine::executeDebuggerCommand(const QString &command)
|
||||
{
|
||||
m_activeEngine->executeDebuggerCommand(command);
|
||||
d->m_activeEngine->executeDebuggerCommand(command);
|
||||
}
|
||||
|
||||
void QmlCppEngine::frameUp()
|
||||
{
|
||||
m_activeEngine->frameUp();
|
||||
d->m_activeEngine->frameUp();
|
||||
}
|
||||
|
||||
void QmlCppEngine::frameDown()
|
||||
{
|
||||
m_activeEngine->frameDown();
|
||||
d->m_activeEngine->frameDown();
|
||||
}
|
||||
|
||||
void QmlCppEngine::notifyInferiorRunOk()
|
||||
@@ -352,7 +373,7 @@ void QmlCppEngine::notifyInferiorRunOk()
|
||||
|
||||
void QmlCppEngine::setupEngine()
|
||||
{
|
||||
m_cppEngine->startDebugger(runControl());
|
||||
d->m_cppEngine->startDebugger(runControl());
|
||||
}
|
||||
|
||||
void QmlCppEngine::setupInferior()
|
||||
@@ -369,40 +390,40 @@ void QmlCppEngine::runEngine()
|
||||
void QmlCppEngine::shutdownInferior()
|
||||
{
|
||||
// user wants to stop inferior: always use cpp engine for this.
|
||||
if (m_activeEngine == m_qmlEngine) {
|
||||
m_activeEngine = m_cppEngine;
|
||||
if (d->m_activeEngine == d->m_qmlEngine) {
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
|
||||
// we end up in this state after trying to shut down while debugging qml.
|
||||
// b/c qml does not shutdown by itself, restore previous state and continue.
|
||||
if (m_qmlEngine->state() == InferiorShutdownRequested) {
|
||||
m_qmlEngine->setState(InferiorStopOk, true);
|
||||
if (d->m_qmlEngine->state() == InferiorShutdownRequested) {
|
||||
d->m_qmlEngine->setState(InferiorStopOk, true);
|
||||
}
|
||||
|
||||
if (m_qmlEngine->state() == InferiorStopOk) {
|
||||
m_qmlEngine->continueInferior();
|
||||
if (d->m_qmlEngine->state() == InferiorStopOk) {
|
||||
d->m_qmlEngine->continueInferior();
|
||||
}
|
||||
}
|
||||
if (m_cppEngine->state() == InferiorRunOk) {
|
||||
if (d->m_cppEngine->state() == InferiorRunOk) {
|
||||
// first interrupt c++ engine; when done, we can shutdown.
|
||||
m_shutdownDeferred = true;
|
||||
m_cppEngine->requestInterruptInferior();
|
||||
d->m_shutdownDeferred = true;
|
||||
d->m_cppEngine->requestInterruptInferior();
|
||||
}
|
||||
if (!m_shutdownDeferred)
|
||||
m_cppEngine->shutdownInferior();
|
||||
if (!d->m_shutdownDeferred)
|
||||
d->m_cppEngine->shutdownInferior();
|
||||
}
|
||||
|
||||
void QmlCppEngine::shutdownEngine()
|
||||
{
|
||||
m_cppEngine->shutdownEngine();
|
||||
m_qmlEngine->shutdownEngineAsSlave();
|
||||
d->m_cppEngine->shutdownEngine();
|
||||
d->m_qmlEngine->shutdownEngineAsSlave();
|
||||
notifyEngineShutdownOk();
|
||||
}
|
||||
|
||||
void QmlCppEngine::finishDebugger()
|
||||
{
|
||||
if (!m_shutdownDone) {
|
||||
m_shutdownDone = true;
|
||||
if (m_shutdownOk) {
|
||||
if (!d->m_shutdownDone) {
|
||||
d->m_shutdownDone = true;
|
||||
if (d->m_shutdownOk) {
|
||||
notifyEngineShutdownOk();
|
||||
} else {
|
||||
notifyEngineShutdownFailed();
|
||||
@@ -418,7 +439,7 @@ void QmlCppEngine::setupSlaveEngineOnTimer()
|
||||
void QmlCppEngine::setupSlaveEngine()
|
||||
{
|
||||
if (state() == InferiorRunRequested)
|
||||
m_qmlEngine->startDebugger(runControl());
|
||||
d->m_qmlEngine->startDebugger(runControl());
|
||||
}
|
||||
|
||||
void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
@@ -463,9 +484,9 @@ void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
break;
|
||||
|
||||
case InferiorRunOk:
|
||||
if (m_qmlEngine->state() == DebuggerNotReady) {
|
||||
if (m_isInitialStartup) {
|
||||
m_isInitialStartup = false;
|
||||
if (d->m_qmlEngine->state() == DebuggerNotReady) {
|
||||
if (d->m_isInitialStartup) {
|
||||
d->m_isInitialStartup = false;
|
||||
setupSlaveEngineOnTimer();
|
||||
} else {
|
||||
setupSlaveEngine();
|
||||
@@ -483,7 +504,7 @@ void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
if (state() == InferiorRunRequested) {
|
||||
// if stopping on startup, move on to normal state
|
||||
// and go forward. Also, stop connection and continue later if needed.
|
||||
m_qmlEngine->pauseConnection();
|
||||
d->m_qmlEngine->pauseConnection();
|
||||
setState(EngineRunRequested, true);
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
setState(newState);
|
||||
@@ -501,25 +522,25 @@ void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
setState(newState);
|
||||
} else if (state() == InferiorRunOk) {
|
||||
// if we break on CPP side while running & engine is QML, switch.
|
||||
if (m_activeEngine == m_qmlEngine) {
|
||||
if (d->m_activeEngine == d->m_qmlEngine) {
|
||||
setActiveEngine(CppLanguage);
|
||||
}
|
||||
setState(newState);
|
||||
} else if (state() == InferiorRunRequested) {
|
||||
setState(newState, true);
|
||||
}
|
||||
if (m_shutdownDeferred) {
|
||||
m_activeEngine = m_cppEngine;
|
||||
m_shutdownDeferred = false;
|
||||
if (d->m_shutdownDeferred) {
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
d->m_shutdownDeferred = false;
|
||||
shutdownInferior();
|
||||
}
|
||||
break;
|
||||
|
||||
case InferiorStopFailed:
|
||||
setState(newState);
|
||||
if (m_shutdownDeferred) {
|
||||
m_activeEngine = m_cppEngine;
|
||||
m_shutdownDeferred = false;
|
||||
if (d->m_shutdownDeferred) {
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
d->m_shutdownDeferred = false;
|
||||
shutdownInferior();
|
||||
}
|
||||
break;
|
||||
@@ -528,22 +549,22 @@ void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
// but due to everything being asyncronous, we cannot guarantee
|
||||
// that it is shut down completely before gdb engine is shut down.
|
||||
case InferiorShutdownRequested:
|
||||
if (m_activeEngine == m_qmlEngine) {
|
||||
m_activeEngine = m_cppEngine;
|
||||
if (d->m_activeEngine == d->m_qmlEngine) {
|
||||
d->m_activeEngine = d->m_cppEngine;
|
||||
}
|
||||
|
||||
m_qmlEngine->shutdownInferiorAsSlave();
|
||||
d->m_qmlEngine->shutdownInferiorAsSlave();
|
||||
setState(newState);
|
||||
break;
|
||||
|
||||
case InferiorShutdownOk:
|
||||
setState(newState);
|
||||
m_qmlEngine->shutdownEngineAsSlave();
|
||||
d->m_qmlEngine->shutdownEngineAsSlave();
|
||||
break;
|
||||
|
||||
case InferiorShutdownFailed:
|
||||
setState(newState);
|
||||
m_qmlEngine->shutdownEngineAsSlave();
|
||||
d->m_qmlEngine->shutdownEngineAsSlave();
|
||||
break;
|
||||
|
||||
case EngineShutdownRequested:
|
||||
@@ -555,7 +576,7 @@ void QmlCppEngine::masterEngineStateChanged(const DebuggerState &newState)
|
||||
break;
|
||||
|
||||
case EngineShutdownFailed:
|
||||
m_shutdownOk = false;
|
||||
d->m_shutdownOk = false;
|
||||
finishDebugger();
|
||||
break;
|
||||
|
||||
@@ -568,7 +589,7 @@ void QmlCppEngine::slaveEngineStateChanged(const DebuggerState &newState)
|
||||
{
|
||||
//qDebug() << " qml engine changed to" << newState;
|
||||
|
||||
if (m_activeEngine == m_qmlEngine) {
|
||||
if (d->m_activeEngine == d->m_qmlEngine) {
|
||||
handleSlaveEngineStateChangeAsActive(newState);
|
||||
} else {
|
||||
handleSlaveEngineStateChange(newState);
|
||||
@@ -604,7 +625,7 @@ void QmlCppEngine::handleSlaveEngineStateChange(const DebuggerState &newState)
|
||||
break;
|
||||
|
||||
case EngineShutdownFailed:
|
||||
m_shutdownOk = false;
|
||||
d->m_shutdownOk = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -634,7 +655,7 @@ void QmlCppEngine::handleSlaveEngineStateChangeAsActive(const DebuggerState &new
|
||||
break;
|
||||
|
||||
case InferiorShutdownRequested:
|
||||
if (m_cppEngine->state() == InferiorRunOk) {
|
||||
if (d->m_cppEngine->state() == InferiorRunOk) {
|
||||
// occurs when user presses stop button from debugger UI.
|
||||
shutdownInferior();
|
||||
}
|
||||
@@ -645,5 +666,9 @@ void QmlCppEngine::handleSlaveEngineStateChangeAsActive(const DebuggerState &new
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
DebuggerEngine *QmlCppEngine::cppEngine() const
|
||||
{
|
||||
return d->m_cppEngine;
|
||||
}
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
|
||||
#include "debuggerengine.h"
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
|
||||
namespace Core {
|
||||
class IEditor;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class GdbEngine;
|
||||
class QmlEngine;
|
||||
struct QmlCppEnginePrivate;
|
||||
|
||||
class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QmlCppEngine(const DebuggerStartParameters &sp);
|
||||
explicit QmlCppEngine(const DebuggerStartParameters &sp);
|
||||
virtual ~QmlCppEngine();
|
||||
|
||||
void setActiveEngine(DebuggerLanguage language);
|
||||
|
||||
virtual void setToolTipExpression(const QPoint & /* mousePos */,
|
||||
TextEditor::ITextEditor * /* editor */, int /* cursorPos */);
|
||||
virtual void updateWatchData(const WatchData & /* data */, const WatchUpdateFlags &flags);
|
||||
virtual void updateWatchData(const Internal::WatchData & /* data */, const Internal::WatchUpdateFlags &flags);
|
||||
|
||||
virtual void watchPoint(const QPoint &);
|
||||
virtual void fetchMemory(MemoryViewAgent *, QObject *,
|
||||
virtual void fetchMemory(Internal::MemoryViewAgent *, QObject *,
|
||||
quint64 addr, quint64 length);
|
||||
virtual void fetchDisassembler(DisassemblerViewAgent *);
|
||||
virtual void fetchDisassembler(Internal::DisassemblerViewAgent *);
|
||||
virtual void activateFrame(int index);
|
||||
|
||||
virtual void reloadModules();
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
QAbstractItemModel *returnModel() const;
|
||||
QAbstractItemModel *sourceFilesModel() const;
|
||||
|
||||
DebuggerEngine *cppEngine() const { return m_cppEngine; }
|
||||
DebuggerEngine *cppEngine() const;
|
||||
|
||||
protected:
|
||||
virtual void detachDebugger();
|
||||
@@ -111,16 +111,9 @@ private:
|
||||
void handleSlaveEngineStateChangeAsActive(const DebuggerState &newState);
|
||||
|
||||
private:
|
||||
QmlEngine *m_qmlEngine;
|
||||
DebuggerEngine *m_cppEngine;
|
||||
DebuggerEngine *m_activeEngine;
|
||||
bool m_shutdownOk;
|
||||
bool m_shutdownDeferred;
|
||||
bool m_shutdownDone;
|
||||
bool m_isInitialStartup;
|
||||
QScopedPointer<QmlCppEnginePrivate> d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // QMLGDBENGINE_H
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/environment.h>
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -96,6 +97,28 @@ QDataStream& operator>>(QDataStream& s, WatchData &data)
|
||||
return s;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
struct QmlEnginePrivate {
|
||||
explicit QmlEnginePrivate(QmlEngine *q);
|
||||
|
||||
int m_ping;
|
||||
QmlAdapter *m_adapter;
|
||||
ProjectExplorer::ApplicationLauncher m_applicationLauncher;
|
||||
bool m_addedAdapterToObjectPool;
|
||||
bool m_attachToRunningExternalApp;
|
||||
bool m_hasShutdown;
|
||||
};
|
||||
|
||||
QmlEnginePrivate::QmlEnginePrivate(QmlEngine *q) :
|
||||
m_ping(0)
|
||||
, m_adapter(new QmlAdapter(q))
|
||||
, m_addedAdapterToObjectPool(false)
|
||||
, m_attachToRunningExternalApp(false)
|
||||
, m_hasShutdown(false)
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// QmlEngine
|
||||
@@ -103,12 +126,7 @@ QDataStream& operator>>(QDataStream& s, WatchData &data)
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters)
|
||||
: DebuggerEngine(startParameters)
|
||||
, m_ping(0)
|
||||
, m_adapter(new QmlAdapter(this))
|
||||
, m_addedAdapterToObjectPool(false)
|
||||
, m_attachToRunningExternalApp(false)
|
||||
, m_hasShutdown(false)
|
||||
: DebuggerEngine(startParameters), d(new QmlEnginePrivate(this))
|
||||
{
|
||||
setObjectName(QLatin1String("QmlEngine"));
|
||||
}
|
||||
@@ -119,12 +137,12 @@ QmlEngine::~QmlEngine()
|
||||
|
||||
void QmlEngine::setAttachToRunningExternalApp(bool value)
|
||||
{
|
||||
m_attachToRunningExternalApp = value;
|
||||
d->m_attachToRunningExternalApp = value;
|
||||
}
|
||||
|
||||
void QmlEngine::pauseConnection()
|
||||
{
|
||||
m_adapter->pauseConnection();
|
||||
d->m_adapter->pauseConnection();
|
||||
}
|
||||
|
||||
void QmlEngine::gotoLocation(const QString &fileName, int lineNumber, bool setMarker)
|
||||
@@ -137,9 +155,9 @@ void QmlEngine::gotoLocation(const QString &fileName, int lineNumber, bool setMa
|
||||
DebuggerEngine::gotoLocation(processedFilename, lineNumber, setMarker);
|
||||
}
|
||||
|
||||
void QmlEngine::gotoLocation(const StackFrame &frame, bool setMarker)
|
||||
void QmlEngine::gotoLocation(const Internal::StackFrame &frame, bool setMarker)
|
||||
{
|
||||
StackFrame adjustedFrame = frame;
|
||||
Internal::StackFrame adjustedFrame = frame;
|
||||
if (isShadowBuildProject())
|
||||
adjustedFrame.file = fromShadowBuildFilename(frame.file);
|
||||
|
||||
@@ -150,17 +168,17 @@ void QmlEngine::setupInferior()
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
|
||||
|
||||
connect(&m_applicationLauncher, SIGNAL(processExited(int)),
|
||||
connect(&d->m_applicationLauncher, SIGNAL(processExited(int)),
|
||||
this, SLOT(disconnected()));
|
||||
connect(&m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
|
||||
this, SLOT(slotMessage(QString, bool)));
|
||||
connect(&m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
|
||||
this, SLOT(slotAddToOutputWindow(QString, bool)));
|
||||
connect(&m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
|
||||
connect(&d->m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
|
||||
runControl(), SLOT(emitAppendMessage(QString,bool)));
|
||||
connect(&d->m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
|
||||
runControl(), SLOT(emitAddToOutputWindow(QString, bool)));
|
||||
connect(&d->m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
|
||||
runControl(), SLOT(bringApplicationToForeground(qint64)));
|
||||
|
||||
m_applicationLauncher.setEnvironment(startParameters().environment);
|
||||
m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
|
||||
d->m_applicationLauncher.setEnvironment(startParameters().environment);
|
||||
d->m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
|
||||
|
||||
notifyInferiorSetupOk();
|
||||
}
|
||||
@@ -170,9 +188,9 @@ void QmlEngine::connectionEstablished()
|
||||
attemptBreakpointSynchronization();
|
||||
|
||||
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
||||
pluginManager->addObject(m_adapter);
|
||||
pluginManager->addObject(d->m_adapter);
|
||||
pluginManager->addObject(this);
|
||||
m_addedAdapterToObjectPool = true;
|
||||
d->m_addedAdapterToObjectPool = true;
|
||||
|
||||
plugin()->showMessage(tr("QML Debugger connected."), StatusBar);
|
||||
|
||||
@@ -199,13 +217,13 @@ void QmlEngine::runEngine()
|
||||
{
|
||||
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
|
||||
|
||||
if (!m_attachToRunningExternalApp) {
|
||||
m_applicationLauncher.start(ProjectExplorer::ApplicationLauncher::Gui,
|
||||
if (!d->m_attachToRunningExternalApp) {
|
||||
d->m_applicationLauncher.start(ProjectExplorer::ApplicationLauncher::Gui,
|
||||
startParameters().executable,
|
||||
startParameters().processArgs);
|
||||
}
|
||||
|
||||
m_adapter->beginConnection();
|
||||
d->m_adapter->beginConnection();
|
||||
plugin()->showMessage(tr("QML Debugger connecting..."), StatusBar);
|
||||
}
|
||||
|
||||
@@ -226,45 +244,45 @@ void QmlEngine::shutdownInferiorAsSlave()
|
||||
|
||||
void QmlEngine::shutdownEngineAsSlave()
|
||||
{
|
||||
if (m_hasShutdown)
|
||||
if (d->m_hasShutdown)
|
||||
return;
|
||||
|
||||
disconnect(m_adapter, SIGNAL(connectionStartupFailed()), this, SLOT(connectionStartupFailed()));
|
||||
m_adapter->closeConnection();
|
||||
disconnect(d->m_adapter, SIGNAL(connectionStartupFailed()), this, SLOT(connectionStartupFailed()));
|
||||
d->m_adapter->closeConnection();
|
||||
|
||||
if (m_addedAdapterToObjectPool) {
|
||||
if (d->m_addedAdapterToObjectPool) {
|
||||
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
||||
pluginManager->removeObject(m_adapter);
|
||||
pluginManager->removeObject(d->m_adapter);
|
||||
pluginManager->removeObject(this);
|
||||
}
|
||||
|
||||
if (m_attachToRunningExternalApp) {
|
||||
if (d->m_attachToRunningExternalApp) {
|
||||
setState(EngineShutdownRequested, true);
|
||||
setState(EngineShutdownOk, true);
|
||||
setState(DebuggerFinished, true);
|
||||
} else {
|
||||
if (m_applicationLauncher.isRunning()) {
|
||||
if (d->m_applicationLauncher.isRunning()) {
|
||||
// should only happen if engine is ill
|
||||
disconnect(&m_applicationLauncher, SIGNAL(processExited(int)), this, SLOT(disconnected()));
|
||||
m_applicationLauncher.stop();
|
||||
disconnect(&d->m_applicationLauncher, SIGNAL(processExited(int)), this, SLOT(disconnected()));
|
||||
d->m_applicationLauncher.stop();
|
||||
}
|
||||
}
|
||||
m_hasShutdown = true;
|
||||
d->m_hasShutdown = true;
|
||||
}
|
||||
|
||||
void QmlEngine::shutdownInferior()
|
||||
{
|
||||
// don't do normal shutdown if running as slave engine
|
||||
if (m_attachToRunningExternalApp)
|
||||
if (d->m_attachToRunningExternalApp)
|
||||
return;
|
||||
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
|
||||
if (!m_applicationLauncher.isRunning()) {
|
||||
if (!d->m_applicationLauncher.isRunning()) {
|
||||
showMessage(tr("Trying to stop while process is no longer running."), LogError);
|
||||
} else {
|
||||
disconnect(&m_applicationLauncher, SIGNAL(processExited(int)), this, SLOT(disconnected()));
|
||||
if (!m_attachToRunningExternalApp)
|
||||
m_applicationLauncher.stop();
|
||||
disconnect(&d->m_applicationLauncher, SIGNAL(processExited(int)), this, SLOT(disconnected()));
|
||||
if (!d->m_attachToRunningExternalApp)
|
||||
d->m_applicationLauncher.stop();
|
||||
}
|
||||
notifyInferiorShutdownOk();
|
||||
}
|
||||
@@ -281,12 +299,12 @@ void QmlEngine::shutdownEngine()
|
||||
|
||||
void QmlEngine::setupEngine()
|
||||
{
|
||||
m_adapter->setMaxConnectionAttempts(MaxConnectionAttempts);
|
||||
m_adapter->setConnectionAttemptInterval(ConnectionAttemptDefaultInterval);
|
||||
connect(m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
|
||||
d->m_adapter->setMaxConnectionAttempts(MaxConnectionAttempts);
|
||||
d->m_adapter->setConnectionAttemptInterval(ConnectionAttemptDefaultInterval);
|
||||
connect(d->m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
|
||||
SLOT(connectionError(QAbstractSocket::SocketError)));
|
||||
connect(m_adapter, SIGNAL(connected()), SLOT(connectionEstablished()));
|
||||
connect(m_adapter, SIGNAL(connectionStartupFailed()), SLOT(connectionStartupFailed()));
|
||||
connect(d->m_adapter, SIGNAL(connected()), SLOT(connectionEstablished()));
|
||||
connect(d->m_adapter, SIGNAL(connectionStartupFailed()), SLOT(connectionStartupFailed()));
|
||||
|
||||
notifyEngineSetupOk();
|
||||
}
|
||||
@@ -397,11 +415,11 @@ void QmlEngine::selectThread(int index)
|
||||
|
||||
void QmlEngine::attemptBreakpointSynchronization()
|
||||
{
|
||||
BreakHandler *handler = breakHandler();
|
||||
Internal::BreakHandler *handler = breakHandler();
|
||||
//bool updateNeeded = false;
|
||||
QSet< QPair<QString, qint32> > breakList;
|
||||
for (int index = 0; index != handler->size(); ++index) {
|
||||
BreakpointData *data = handler->at(index);
|
||||
Internal::BreakpointData *data = handler->at(index);
|
||||
QString processedFilename = data->fileName;
|
||||
if (isShadowBuildProject())
|
||||
processedFilename = toShadowBuildFilename(data->fileName);
|
||||
@@ -442,10 +460,6 @@ void QmlEngine::requestModuleSymbols(const QString &moduleName)
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
static WatchData m_toolTip;
|
||||
static QPoint m_toolTipPos;
|
||||
static QHash<QString, WatchData> m_toolTipCache;
|
||||
|
||||
void QmlEngine::setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos)
|
||||
{
|
||||
// this is processed by QML inspector, which has deps to qml js editor. Makes life easier.
|
||||
@@ -476,7 +490,7 @@ void QmlEngine::assignValueInDebugger(const QString &expression,
|
||||
}
|
||||
}
|
||||
|
||||
void QmlEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &)
|
||||
void QmlEngine::updateWatchData(const Internal::WatchData &data, const Internal::WatchUpdateFlags &)
|
||||
{
|
||||
// qDebug() << "UPDATE WATCH DATA" << data.toString();
|
||||
//watchHandler()->rebuildModel();
|
||||
@@ -517,18 +531,20 @@ void QmlEngine::expandObject(const QByteArray& iname, quint64 objectId)
|
||||
|
||||
void QmlEngine::sendPing()
|
||||
{
|
||||
m_ping++;
|
||||
d->m_ping++;
|
||||
QByteArray reply;
|
||||
QDataStream rs(&reply, QIODevice::WriteOnly);
|
||||
rs << QByteArray("PING");
|
||||
rs << m_ping;
|
||||
rs << d->m_ping;
|
||||
sendMessage(reply);
|
||||
}
|
||||
|
||||
namespace Internal {
|
||||
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &sp)
|
||||
{
|
||||
return new QmlEngine(sp);
|
||||
}
|
||||
} // namespace Internal
|
||||
|
||||
unsigned QmlEngine::debuggerCapabilities() const
|
||||
{
|
||||
@@ -552,21 +568,21 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
QByteArray command;
|
||||
stream >> command;
|
||||
|
||||
showMessage(_("RECEIVED RESPONSE: ") + quoteUnprintableLatin1(message));
|
||||
showMessage(QLatin1String("RECEIVED RESPONSE: ") + Internal::quoteUnprintableLatin1(message));
|
||||
if (command == "STOPPED") {
|
||||
if (state() == InferiorRunOk) {
|
||||
notifyInferiorSpontaneousStop();
|
||||
}
|
||||
|
||||
QList<QPair<QString, QPair<QString, qint32> > > backtrace;
|
||||
QList<WatchData> watches;
|
||||
QList<WatchData> locals;
|
||||
QList<Internal::WatchData> watches;
|
||||
QList<Internal::WatchData> locals;
|
||||
stream >> backtrace >> watches >> locals;
|
||||
|
||||
StackFrames stackFrames;
|
||||
Internal::StackFrames stackFrames;
|
||||
typedef QPair<QString, QPair<QString, qint32> > Iterator;
|
||||
foreach (const Iterator &it, backtrace) {
|
||||
StackFrame frame;
|
||||
Internal::StackFrame frame;
|
||||
frame.file = it.second.first;
|
||||
frame.line = it.second.second;
|
||||
frame.function = it.first;
|
||||
@@ -579,7 +595,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
watchHandler()->beginCycle();
|
||||
bool needPing = false;
|
||||
|
||||
foreach (WatchData data, watches) {
|
||||
foreach (Internal::WatchData data, watches) {
|
||||
data.iname = watchHandler()->watcherName(data.exp);
|
||||
watchHandler()->insertData(data);
|
||||
|
||||
@@ -589,7 +605,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
}
|
||||
}
|
||||
|
||||
foreach (WatchData data, locals) {
|
||||
foreach (Internal::WatchData data, locals) {
|
||||
data.iname = "local." + data.exp;
|
||||
watchHandler()->insertData(data);
|
||||
|
||||
@@ -618,7 +634,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
|
||||
|
||||
} else if (command == "RESULT") {
|
||||
WatchData data;
|
||||
Internal::WatchData data;
|
||||
QByteArray iname;
|
||||
stream >> iname >> data;
|
||||
data.iname = iname;
|
||||
@@ -630,11 +646,11 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
qWarning() << "QmlEngine: Unexcpected result: " << iname << data.value;
|
||||
}
|
||||
} else if (command == "EXPANDED") {
|
||||
QList<WatchData> result;
|
||||
QList<Internal::WatchData> result;
|
||||
QByteArray iname;
|
||||
stream >> iname >> result;
|
||||
bool needPing = false;
|
||||
foreach (WatchData data, result) {
|
||||
foreach (Internal::WatchData data, result) {
|
||||
data.iname = iname + '.' + data.exp;
|
||||
watchHandler()->insertData(data);
|
||||
|
||||
@@ -646,12 +662,12 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
if (needPing)
|
||||
sendPing();
|
||||
} else if (command == "LOCALS") {
|
||||
QList<WatchData> locals;
|
||||
QList<Internal::WatchData> locals;
|
||||
int frameId;
|
||||
stream >> frameId >> locals;
|
||||
watchHandler()->beginCycle();
|
||||
bool needPing = false;
|
||||
foreach (WatchData data, locals) {
|
||||
foreach (Internal::WatchData data, locals) {
|
||||
data.iname = "local." + data.exp;
|
||||
watchHandler()->insertData(data);
|
||||
if (watchHandler()->expandedINames().contains(data.iname)) {
|
||||
@@ -667,7 +683,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
} else if (command == "PONG") {
|
||||
int ping;
|
||||
stream >> ping;
|
||||
if (ping == m_ping)
|
||||
if (ping == d->m_ping)
|
||||
watchHandler()->endCycle();
|
||||
} else {
|
||||
qDebug() << Q_FUNC_INFO << "Unknown command: " << command;
|
||||
@@ -681,17 +697,6 @@ void QmlEngine::disconnected()
|
||||
notifyInferiorExited();
|
||||
}
|
||||
|
||||
void QmlEngine::slotAddToOutputWindow(QString line, bool onStdErr)
|
||||
{
|
||||
emit runControl()->addToOutputWindowInline(runControl(), line, onStdErr);
|
||||
}
|
||||
|
||||
void QmlEngine::slotMessage(QString err , bool isError)
|
||||
{
|
||||
emit runControl()->appendMessage(runControl(), err, isError);
|
||||
}
|
||||
|
||||
|
||||
void QmlEngine::executeDebuggerCommand(const QString& command)
|
||||
{
|
||||
QByteArray reply;
|
||||
@@ -769,6 +774,5 @@ QString QmlEngine::fromShadowBuildFilename(const QString &filename) const
|
||||
return newFilename;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
|
||||
@@ -32,32 +32,13 @@
|
||||
|
||||
#include "debuggerengine.h"
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPoint>
|
||||
#include <QtCore/QProcess>
|
||||
#include <QtCore/QQueue>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QtNetwork/QAbstractSocket>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
|
||||
namespace Core {
|
||||
class TextEditor;
|
||||
}
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class ScriptAgent;
|
||||
class WatchData;
|
||||
class QmlAdapter;
|
||||
class QmlResponse;
|
||||
class QmlDebuggerClient;
|
||||
|
||||
struct QmlEnginePrivate;
|
||||
|
||||
class DEBUGGER_EXPORT QmlEngine : public DebuggerEngine
|
||||
{
|
||||
@@ -65,14 +46,14 @@ class DEBUGGER_EXPORT QmlEngine : public DebuggerEngine
|
||||
|
||||
public:
|
||||
explicit QmlEngine(const DebuggerStartParameters &startParameters);
|
||||
~QmlEngine();
|
||||
virtual ~QmlEngine();
|
||||
|
||||
void setAttachToRunningExternalApp(bool value);
|
||||
void shutdownInferiorAsSlave();
|
||||
void shutdownEngineAsSlave();
|
||||
void pauseConnection();
|
||||
void gotoLocation(const QString &fileName, int lineNumber, bool setMarker);
|
||||
void gotoLocation(const StackFrame &frame, bool setMarker);
|
||||
void gotoLocation(const Internal::StackFrame &frame, bool setMarker);
|
||||
|
||||
public slots:
|
||||
void messageReceived(const QByteArray &message);
|
||||
@@ -117,7 +98,7 @@ private:
|
||||
void reloadFullStack() {}
|
||||
|
||||
bool supportsThreads() const { return false; }
|
||||
void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags);
|
||||
void updateWatchData(const Internal::WatchData &data, const Internal::WatchUpdateFlags &flags);
|
||||
void executeDebuggerCommand(const QString& command);
|
||||
|
||||
unsigned int debuggerCapabilities() const;
|
||||
@@ -131,8 +112,6 @@ private slots:
|
||||
void connectionStartupFailed();
|
||||
void connectionError(QAbstractSocket::SocketError error);
|
||||
|
||||
void slotMessage(QString, bool);
|
||||
void slotAddToOutputWindow(QString, bool);
|
||||
private:
|
||||
void expandObject(const QByteArray &iname, quint64 objectId);
|
||||
void sendPing();
|
||||
@@ -146,15 +125,9 @@ private:
|
||||
private:
|
||||
friend class QmlCppEngine;
|
||||
|
||||
int m_ping;
|
||||
QmlAdapter *m_adapter;
|
||||
ProjectExplorer::ApplicationLauncher m_applicationLauncher;
|
||||
bool m_addedAdapterToObjectPool;
|
||||
bool m_attachToRunningExternalApp;
|
||||
bool m_hasShutdown;
|
||||
QScopedPointer<QmlEnginePrivate> d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGER_QMLENGINE_H
|
||||
|
||||
@@ -34,10 +34,9 @@
|
||||
#include <QtCore/QVector>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
class Register
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -52,13 +52,13 @@ class WatchData;
|
||||
* processEvents() triggered by QScriptEngine::setProcessEventsInterval().
|
||||
* Stopping is emulated by manually calling processEvents() from the debugger engine. */
|
||||
|
||||
class ScriptEngine : public DebuggerEngine
|
||||
class ScriptEngine : public Debugger::DebuggerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScriptEngine(const DebuggerStartParameters &startParameters);
|
||||
~ScriptEngine();
|
||||
explicit ScriptEngine(const DebuggerStartParameters &startParameters);
|
||||
virtual ~ScriptEngine();
|
||||
|
||||
private:
|
||||
// DebuggerEngine implementation
|
||||
|
||||
@@ -36,11 +36,9 @@
|
||||
namespace Debugger {
|
||||
|
||||
class DebuggerRunControl;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class SourceFilesHandler : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
#include <QtGui/QIcon>
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
class DisassemblerViewAgent;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Internal {
|
||||
class ScriptAgent;
|
||||
class WatchData;
|
||||
|
||||
class TcfEngine : public DebuggerEngine
|
||||
class TcfEngine : public Debugger::DebuggerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ThreadData
|
||||
|
||||
@@ -40,9 +40,10 @@
|
||||
#include <QtCore/QAbstractItemModel>
|
||||
|
||||
namespace Debugger {
|
||||
class DebuggerEngine;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DebuggerEngine;
|
||||
class WatchItem;
|
||||
class WatchHandler;
|
||||
class WatchData;
|
||||
|
||||
Reference in New Issue
Block a user