all repos — mgba @ 4cb243f15c011264e3b4e84100f6e4a050c4a623

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 "DebuggerController.h"
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 DebuggerController {
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 listen();
35
36signals:
37	void listening();
38	void listenFailed();
39
40private:
41	virtual void shutdownInternal() override;
42
43	GDBStub m_gdbStub;
44
45	ushort m_port;
46	Address m_bindAddress;
47};
48
49}
50
51#endif
52
53#endif