all repos — mgba @ c83e4e7e851fcd268296c01eb09f21209486c69a

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	void breakInto();
38
39signals:
40	void listening();
41	void listenFailed();
42
43private:
44	GDBStub m_gdbStub;
45	GameController* m_gameController;
46
47	ushort m_port;
48	Address m_bindAddress;
49
50	QMetaObject::Connection m_autoattach;
51};
52
53}
54
55#endif
56
57#endif