qmlcppengine.h 3.32 KB
Newer Older
1
2
3
4
5
#ifndef QMLGDBENGINE_H
#define QMLGDBENGINE_H

#include "debuggerengine.h"

6
7
#include <QtCore/QScopedPointer>

8
9
10
11
12
namespace Core {
class IEditor;
}

namespace Debugger {
13
namespace Internal {
14

Tobias Hunger's avatar
Tobias Hunger committed
15
class QmlCppEnginePrivate;
16

17
class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine
18
19
20
{
    Q_OBJECT
public:
21
    explicit QmlCppEngine(const DebuggerStartParameters &sp);
22
23
24
25
    virtual ~QmlCppEngine();

    void setActiveEngine(DebuggerLanguage language);

hjk's avatar
hjk committed
26
27
    virtual void setToolTipExpression(const QPoint &mousePos,
        TextEditor::ITextEditor * editor, int cursorPos);
28
29
    virtual void updateWatchData(const WatchData &data,
        const WatchUpdateFlags &flags);
30
31

    virtual void watchPoint(const QPoint &);
32
    virtual void fetchMemory(MemoryAgent *, QObject *,
33
            quint64 addr, quint64 length);
34
    virtual void fetchDisassembler(DisassemblerAgent *);
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
    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;

hjk's avatar
hjk committed
50
    virtual bool isSynchronous() const;
51
    virtual QByteArray qtNamespace() const;
52
53
54
55
56

    virtual void createSnapshot();
    virtual void updateAll();

    virtual void attemptBreakpointSynchronization();
57
    virtual bool acceptsBreakpoint(BreakpointId id) const;
58
59
    virtual void selectThread(int index);

60
    virtual void assignValueInDebugger(const WatchData *data,
hjk's avatar
hjk committed
61
        const QString &expr, const QVariant &value);
62

63
    DebuggerEngine *cppEngine() const;
64
65
    virtual void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
    virtual void handleRemoteSetupFailed(const QString &message);
66

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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:
97
98
    void cppEngineStateChanged(const DebuggerState &state);
    void qmlEngineStateChanged(const DebuggerState &state);
99
100
101
102
    void setupSlaveEngine();
    void editorChanged(Core::IEditor *editor);

private:
103
104
105
    void initEngineShutdown();
    bool checkErrorState(const DebuggerState stateToCheck);
    void engineStateChanged(const DebuggerState &newState);
106
107

private:
108
    QScopedPointer<QmlCppEnginePrivate> d;
109
110
};

111
} // namespace Internal
112
113
114
} // namespace Debugger

#endif // QMLGDBENGINE_H