all repos — mgba @ 9b0393d50ffcd27c487740098c3c0bb72b16529f

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
13#include <mgba/internal/debugger/gdb-stub.h>
14
15namespace QGBA {
16
17class CoreController;
18
19class GDBController : public DebuggerController {
20Q_OBJECT
21
22public:
23	GDBController(QObject* parent = nullptr);
24
25public:
26	ushort port();
27	bool isAttached();
28
29public slots:
30	void setPort(ushort port);
31	void setBindAddress(uint32_t bindAddress);
32	void listen();
33
34signals:
35	void listening();
36	void listenFailed();
37
38private:
39	virtual void shutdownInternal() override;
40
41	GDBStub m_gdbStub{};
42
43	ushort m_port = 2345;
44	Address m_bindAddress;
45};
46
47}
48
49#endif
50
51#endif