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