qmlcppengine.h 3.36 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
    virtual ~QmlCppEngine();

24
    DebuggerLanguage activeEngine() const;
25
26
    void setActiveEngine(DebuggerLanguage language);

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

    virtual void watchPoint(const QPoint &);
33
    virtual void fetchMemory(MemoryAgent *, QObject *,
34
            quint64 addr, quint64 length);
35
    virtual void fetchDisassembler(DisassemblerAgent *);
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
    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
51
    virtual bool isSynchronous() const;
52
    virtual QByteArray qtNamespace() const;
53
54
55
56
57

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

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

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

64
    DebuggerEngine *cppEngine() const;
65
66
    virtual void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
    virtual void handleRemoteSetupFailed(const QString &message);
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
97
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:
98
99
    void cppEngineStateChanged(const DebuggerState &state);
    void qmlEngineStateChanged(const DebuggerState &state);
100
101
102
103
    void setupSlaveEngine();
    void editorChanged(Core::IEditor *editor);

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

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

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

#endif // QMLGDBENGINE_H