all repos — mgba @ 9c92a29b28d1f81224ba28d5fc83a9481eccd5eb

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
11extern "C" {
12#include "debugger/gdb-stub.h"
13}
14
15namespace QGBA {
16
17class GameController;
18
19class GDBController : public QObject {
20Q_OBJECT
21
22public:
23	GDBController(GameController* controller, QObject* parent = nullptr);
24
25public:
26	ushort port();
27	uint32_t bindAddress();
28	bool isAttached();
29
30public slots:
31	void setPort(ushort port);
32	void setBindAddress(uint32_t bindAddress);
33	void attach();
34	void detach();
35	void listen();
36
37private slots:
38	void updateGDB();
39
40private:
41	GDBStub m_gdbStub;
42	GameController* m_gameController;
43
44	ushort m_port;
45	uint32_t m_bindAddress;
46};
47
48}
49#endif