all repos — mgba @ 10ba7d16b30b675261ce65d9741119eb930250eb

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
38private slots:
39	void updateGDB();
40
41private:
42	GDBStub m_gdbStub;
43	GameController* m_gameController;
44
45	ushort m_port;
46	Address m_bindAddress;
47};
48
49}
50
51#endif
52
53#endif