all repos — mgba @ 9b8b56d701b6aa204f67e102a07af763fb877828

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	bool isAttached();
30
31public slots:
32	void setPort(ushort port);
33	void setBindAddress(uint32_t bindAddress);
34	void attach();
35	void detach();
36	void listen();
37
38signals:
39	void listening();
40	void listenFailed();
41
42private:
43	GDBStub m_gdbStub;
44	GameController* m_gameController;
45
46	ushort m_port;
47	Address m_bindAddress;
48};
49
50}
51
52#endif
53
54#endif