<commit_before>/* Copyright (c) 2013-2014 <NAME>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef QGBA_GDB_CONTROLLER
#define QGBA_GDB_CONTROLLER

#include <QObject>

extern "C" {
#include "debugger/gdb-stub.h"
}

namespace QGBA {

class GameController;

class GDBController : public QObject {
Q_OBJECT

public:
	GDBController(GameController* controller, QObject* parent = nullptr);

public:
	ushort port();
	uint32_t bindAddress();
	bool isAttached();

public slots:
	void setPort(ushort port);
	void setBindAddress(uint32_t bindAddress);
	void attach();
	void detach();
	void listen();

private slots:
	void updateGDB();

private:
	GDBStub m_gdbStub;
	GameController* m_gameController;

	ushort m_port;
	uint32_t m_bindAddress;
};

}
#endif<commit_msg>Qt: Guard GDBController class with an ifdef<commit_after>/* Copyright (c) 2013-2014 <NAME>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef QGBA_GDB_CONTROLLER
#define QGBA_GDB_CONTROLLER

#include <QObject>

#ifdef USE_GDB_STUB

extern "C" {
#include "debugger/gdb-stub.h"
}

namespace QGBA {

class GameController;

class GDBController : public QObject {
Q_OBJECT

public:
	GDBController(GameController* controller, QObject* parent = nullptr);

public:
	ushort port();
	uint32_t bindAddress();
	bool isAttached();

public slots:
	void setPort(ushort port);
	void setBindAddress(uint32_t bindAddress);
	void attach();
	void detach();
	void listen();

private slots:
	void updateGDB();

private:
	GDBStub m_gdbStub;
	GameController* m_gameController;

	ushort m_port;
	uint32_t m_bindAddress;
};

}

#endif

#endif
{'fraction_non_alphanumeric': 0.10357518401682439, 'fraction_numerical': 0.01892744479495268, 'mean_word_length': 4.78419452887538, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4506353', 'n_tokens_mistral': 707, 'n_tokens_neox': 678, 'n_words': 206}