all repos — mgba @ 968069ff5e9258ed6ceb1e033a6ebf84bd63cfa0

mGBA Game Boy Advance Emulator

src/platform/qt/GDBController.h (view raw)

 1/* Copyright (c) 2013-2014 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_GDB_CONTROLLER
 7#define QGBA_GDB_CONTROLLER
 8
 9#include <QObject>
10
11#ifdef USE_GDB_STUB
12
13extern "C" {
14#include "debugger/gdb-stub.h"
15}
16
17namespace QGBA {
18
19class GameController;
20
21class GDBController : public QObject {
22Q_OBJECT
23
24public:
25	GDBController(GameController* controller, QObject* parent = nullptr);
26
27public:
28	ushort port();
29	uint32_t bindAddress();
30	bool isAttached();
31
32public slots:
33	void setPort(ushort port);
34	void setBindAddress(uint32_t bindAddress);
35	void attach();
36	void detach();
37	void listen();
38
39private slots:
40	void updateGDB();
41
42private:
43	GDBStub m_gdbStub;
44	GameController* m_gameController;
45
46	ushort m_port;
47	uint32_t m_bindAddress;
48};
49
50}
51
52#endif
53
54#endif