mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-19 01:15:08 -04:00
46 lines
No EOL
1.7 KiB
C++
46 lines
No EOL
1.7 KiB
C++
/*
|
|
* Copyright (c) 2019 Atmosphère-NX
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
// Some code from:
|
|
/*
|
|
* This file is part of Luma3DS.
|
|
* Copyright (C) 2016-2019 Aurora Wright, TuxSH
|
|
*
|
|
* SPDX-License-Identifier: (MIT OR GPL-2.0-or-later)
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "../defines.hpp"
|
|
|
|
// 512+24 is the ideal size as IDA will try to read exactly 0x100 bytes at a time.
|
|
// IDA seems to want additional bytes as well.
|
|
// 1024 is fine enough to put all regs in the 'T' stop reply packets
|
|
// Add 4 to this for the actual allocated size, for $#<checksum>, see below.
|
|
#define GDB_BUF_LEN 0x800
|
|
#define GDB_WORK_BUF_LEN 0x1000
|
|
|
|
#define HANDLER(name) Handle##name
|
|
#define QUERY_HANDLER(name) HANDLER(Query##name)
|
|
#define VERBOSE_HANDLER(name) HANDLER(Verbose##name)
|
|
|
|
#define DECLARE_HANDLER(name) int HANDLER(name)()
|
|
#define DECLARE_QUERY_HANDLER(name) DECLARE_HANDLER(Query##name)
|
|
#define DECLARE_VERBOSE_HANDLER(name) DECLARE_HANDLER(Verbose##name)
|
|
|
|
#define DEFINE_HANDLER(name) int Context::HANDLER(name)()
|
|
#define DEFINE_QUERY_HANDLER(name) DEFINE_HANDLER(Query##name)
|
|
#define DECLARE_VERBOSE_HANDLER(name) DEFINE_HANDLER(Verbose##name) |