2010-08-18 13:54:12 +02:00
|
|
|
#ifndef QMLGDBENGINE_H
|
|
|
|
|
#define QMLGDBENGINE_H
|
|
|
|
|
|
|
|
|
|
#include "debuggerengine.h"
|
|
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
#include <QtCore/QScopedPointer>
|
|
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
namespace Core {
|
|
|
|
|
class IEditor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Debugger {
|
2010-11-22 10:20:31 +01:00
|
|
|
namespace Internal {
|
2010-12-03 12:07:32 +01:00
|
|
|
|
2010-11-15 17:47:21 +01:00
|
|
|
class QmlCppEnginePrivate;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2010-09-08 14:25:33 +02:00
|
|
|
class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine
|
2010-08-18 13:54:12 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2010-09-13 13:30:35 +02:00
|
|
|
explicit QmlCppEngine(const DebuggerStartParameters &sp);
|
2010-08-18 13:54:12 +02:00
|
|
|
virtual ~QmlCppEngine();
|
|
|
|
|
|
2010-11-15 17:09:28 +01:00
|
|
|
DebuggerLanguage activeEngine() const;
|
2010-08-18 13:54:12 +02:00
|
|
|
void setActiveEngine(DebuggerLanguage language);
|
|
|
|
|
|
2010-10-27 15:23:30 +02:00
|
|
|
virtual void setToolTipExpression(const QPoint &mousePos,
|
|
|
|
|
TextEditor::ITextEditor * editor, int cursorPos);
|
2010-12-03 12:07:32 +01:00
|
|
|
virtual void updateWatchData(const WatchData &data,
|
|
|
|
|
const WatchUpdateFlags &flags);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
|
|
|
|
virtual void watchPoint(const QPoint &);
|
2010-12-14 12:29:32 +01:00
|
|
|
virtual void fetchMemory(MemoryAgent *, QObject *,
|
2010-08-18 13:54:12 +02:00
|
|
|
quint64 addr, quint64 length);
|
2010-12-14 12:29:32 +01:00
|
|
|
virtual void fetchDisassembler(DisassemblerAgent *);
|
2010-08-18 13:54:12 +02:00
|
|
|
virtual void activateFrame(int index);
|
|
|
|
|
|
|
|
|
|
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 setRegisterValue(int regnr, const QString &value);
|
|
|
|
|
virtual unsigned debuggerCapabilities() const;
|
|
|
|
|
|
2010-08-30 07:52:41 +02:00
|
|
|
virtual bool isSynchronous() const;
|
2010-09-01 17:36:09 +02:00
|
|
|
virtual QByteArray qtNamespace() const;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
|
|
|
|
virtual void createSnapshot();
|
|
|
|
|
virtual void updateAll();
|
|
|
|
|
|
|
|
|
|
virtual void attemptBreakpointSynchronization();
|
2010-11-26 10:20:50 +01:00
|
|
|
virtual bool acceptsBreakpoint(BreakpointId id) const;
|
2010-08-18 13:54:12 +02:00
|
|
|
virtual void selectThread(int index);
|
|
|
|
|
|
2010-12-03 12:07:32 +01:00
|
|
|
virtual void assignValueInDebugger(const WatchData *data,
|
2010-10-27 15:23:30 +02:00
|
|
|
const QString &expr, const QVariant &value);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
|
|
|
|
QAbstractItemModel *modulesModel() const;
|
|
|
|
|
QAbstractItemModel *registerModel() const;
|
|
|
|
|
QAbstractItemModel *stackModel() const;
|
|
|
|
|
QAbstractItemModel *threadsModel() const;
|
|
|
|
|
QAbstractItemModel *localsModel() const;
|
|
|
|
|
QAbstractItemModel *watchersModel() const;
|
|
|
|
|
QAbstractItemModel *returnModel() const;
|
|
|
|
|
QAbstractItemModel *sourceFilesModel() const;
|
|
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
DebuggerEngine *cppEngine() const;
|
2010-12-10 12:41:44 +01:00
|
|
|
virtual void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
|
|
|
|
|
virtual void handleRemoteSetupFailed(const QString &message);
|
2010-09-08 14:25:33 +02:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
protected:
|
|
|
|
|
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 requestInterruptInferior();
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
virtual void notifyInferiorRunOk();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void setupEngine();
|
|
|
|
|
virtual void setupInferior();
|
|
|
|
|
virtual void runEngine();
|
|
|
|
|
virtual void shutdownInferior();
|
|
|
|
|
virtual void shutdownEngine();
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void masterEngineStateChanged(const DebuggerState &state);
|
|
|
|
|
void slaveEngineStateChanged(const DebuggerState &state);
|
|
|
|
|
void setupSlaveEngine();
|
|
|
|
|
void editorChanged(Core::IEditor *editor);
|
|
|
|
|
|
|
|
|
|
private:
|
2010-11-15 17:09:28 +01:00
|
|
|
void initEngineShutdown();
|
|
|
|
|
bool checkErrorState(const DebuggerState stateToCheck);
|
|
|
|
|
void engineStateChanged(const DebuggerState &newState);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
|
|
|
|
private:
|
2010-12-03 12:07:32 +01:00
|
|
|
QScopedPointer<QmlCppEnginePrivate> d;
|
2010-08-18 13:54:12 +02:00
|
|
|
};
|
|
|
|
|
|
2010-12-03 12:07:32 +01:00
|
|
|
} // namespace Internal
|
2010-08-18 13:54:12 +02:00
|
|
|
} // namespace Debugger
|
|
|
|
|
|
|
|
|
|
#endif // QMLGDBENGINE_H
|