1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef DEBUGGER_H |
6 | #define DEBUGGER_H |
7 | |
8 | #include "dap/protocol.h" |
9 | #include <QObject> |
10 | |
11 | class Debugger : public QObject |
12 | { |
13 | Q_OBJECT |
14 | public: |
15 | explicit Debugger(QObject *parent = nullptr); |
16 | virtual ~Debugger() = 0; |
17 | |
18 | virtual QString program() = 0; |
19 | virtual QStringList preArguments() = 0; |
20 | virtual QString quit() = 0; |
21 | virtual QString kill() = 0; |
22 | virtual QString launchLocal() = 0; |
23 | |
24 | virtual QString breakRemoveAll() = 0; |
25 | virtual QString breakInsert(const QString& path) = 0; |
26 | virtual QString breakRemove(int bpid) = 0; |
27 | |
28 | virtual QString commandPause() = 0; |
29 | virtual QString commandContinue() = 0; |
30 | virtual QString commandNext() = 0; |
31 | virtual QString commandStep() = 0; |
32 | virtual QString commandFinish() = 0; |
33 | |
34 | virtual QString threadInfo() = 0; |
35 | virtual QString threadSelect(const int threadId) = 0; |
36 | |
37 | virtual QString stackListFrames() = 0; |
38 | virtual QString stackListVariables() = 0; |
39 | |
40 | virtual QString listSourceFiles() = 0; |
41 | |
42 | virtual dap::array<dap::StackFrame> allStackframes() = 0; |
43 | virtual dap::array<dap::Thread> allThreadList() = 0; |
44 | virtual dap::array<dap::Variable> allVariableList() = 0; |
45 | |
46 | virtual void handleOutputRecord(const QString &text) = 0; |
47 | virtual void handleOutputStreamText(const QString &streamText) = 0; |
48 | |
49 | virtual void parseBreakPoint(const QVariant& var) = 0; |
50 | virtual void removeBreakPoint(const int bpid) = 0; |
51 | virtual void clearBreakPoint() = 0; |
52 | virtual QList<int> breakpointsForFile(const QString &filePath) = 0; |
53 | |
54 | virtual bool isInferiorRunning() = 0; |
55 | |
56 | virtual QString disassemble(const QString &address) { Q_UNUSED(address) return "" ;} |
57 | |
58 | signals: |
59 | |
60 | public slots: |
61 | |
62 | private: |
63 | |
64 | }; |
65 | |
66 | #endif // DEBUGGER_H |
67 | |