src/platform/qt/GDBController.h (view raw)
1#ifndef QGBA_GDB_CONTROLLER
2#define QGBA_GDB_CONTROLLER
3
4#include <QObject>
5
6extern "C" {
7#include "gdb-stub.h"
8}
9
10namespace QGBA {
11
12class GameController;
13
14class GDBController : public QObject {
15Q_OBJECT
16
17public:
18 GDBController(GameController* controller, QObject* parent = nullptr);
19
20public:
21 ushort port();
22 uint32_t bindAddress();
23 bool isAttached();
24
25public slots:
26 void setPort(ushort port);
27 void setBindAddress(uint32_t bindAddress);
28 void attach();
29 void detach();
30 void listen();
31
32private slots:
33 void updateGDB();
34
35private:
36 GDBStub m_gdbStub;
37 GameController* m_gameController;
38
39 ushort m_port;
40 uint32_t m_bindAddress;
41};
42
43}
44#endif