mirror of
https://github.com/starr-dusT/citra.git
synced 2024-10-02 10:26:17 -07:00

* renderer_gl: Make rasterizer normal class member * It doesn't need to be heap allocated anymore * gl_rasterizer: Remove default_texture * It's unused * gl_rasterizer: General cleanup * gl_rasterizer: Lower case lambdas * Match style with review comments from vulkan backend * rasterizer_cache: Prevent memory leak * Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends * rasterizer_cache: Make temp copy of old surface * The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly * citra_qt: Manually create dialog tabs * Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration * citra_qt: Eliminate global system usage * core: Remove global system usage in memory and HIO * citra_qt: Use qOverload * tests: Run clang format * gl_texture_runtime: Fix surface scaling
69 lines
1.9 KiB
C++
69 lines
1.9 KiB
C++
// Copyright 2023 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include "common/common_types.h"
|
|
|
|
namespace Core {
|
|
class System;
|
|
}
|
|
|
|
namespace GDBStub {
|
|
|
|
/**
|
|
* A request from a debugged application to perform some I/O with the GDB client.
|
|
* This structure is also used to encode the reply back to the application.
|
|
*
|
|
* Based on the Rosalina + libctru implementations:
|
|
* https://github.com/LumaTeam/Luma3DS/blob/master/sysmodules/rosalina/include/gdb.h#L46C27-L62
|
|
* https://github.com/devkitPro/libctru/blob/master/libctru/source/gdbhio.c#L71-L87
|
|
*/
|
|
struct PackedGdbHioRequest {
|
|
std::array<char, 4> magic; // "GDB\0"
|
|
u32 version;
|
|
|
|
private:
|
|
static inline constexpr std::size_t MAX_FUNCNAME_LEN = 16;
|
|
static inline constexpr std::size_t PARAM_COUNT = 8;
|
|
|
|
public:
|
|
// Request. Char arrays have +1 entry for null terminator
|
|
std::array<char, MAX_FUNCNAME_LEN + 1> function_name;
|
|
std::array<char, PARAM_COUNT + 1> param_format;
|
|
|
|
std::array<u64, PARAM_COUNT> parameters;
|
|
std::array<u32, PARAM_COUNT> string_lengths;
|
|
|
|
// Return
|
|
s64 retval;
|
|
s32 gdb_errno;
|
|
bool ctrl_c;
|
|
};
|
|
|
|
static_assert(sizeof(PackedGdbHioRequest) == 152,
|
|
"HIO request size must match libctru implementation");
|
|
|
|
/**
|
|
* Set the current HIO request to the given address. This is how the debugged
|
|
* app indicates to the gdbstub that it wishes to perform a request.
|
|
*
|
|
* @param address The memory address of the \ref PackedGdbHioRequest.
|
|
*/
|
|
void SetHioRequest(Core::System& system, const VAddr address);
|
|
|
|
/**
|
|
* If there is a pending HIO request, send it to the client.
|
|
*
|
|
* @returns whethere any request was sent to the client.
|
|
*/
|
|
bool HandlePendingHioRequestPacket();
|
|
|
|
/**
|
|
* Process an HIO reply from the client.
|
|
*/
|
|
void HandleHioReply(Core::System& system, const u8* const command_buffer, const u32 command_length);
|
|
|
|
} // namespace GDBStub
|