aboutsummaryrefslogtreecommitdiff
path: root/src/core/debugger/gdbstub.h
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2025-10-27 20:55:01 +0100
committercrueter <crueter@eden-emu.dev>2025-10-27 20:55:01 +0100
commitdd9cae4ebcf4256b3da4c92e34f61fcffd85035b (patch)
tree38685fa2cd55c504326c6ee3c979c539ca5a2460 /src/core/debugger/gdbstub.h
parent8fa36a7737e3fe1a53029dabff62adc827a56630 (diff)
[logging, debugger] remove unescesary logic and only query USER env variable once (#2800)
- censoring an username would lead to the variable being queried everytime something is written, just store it on a static - dont use a map<> for something that can be done in a switch statment (and that the compiler will optimise for free!!!) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2800 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/core/debugger/gdbstub.h')
-rw-r--r--src/core/debugger/gdbstub.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/core/debugger/gdbstub.h b/src/core/debugger/gdbstub.h
index 232dcf49f5..140b0e8e25 100644
--- a/src/core/debugger/gdbstub.h
+++ b/src/core/debugger/gdbstub.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -24,19 +27,14 @@ namespace Core {
class System;
-class GDBStub : public DebuggerFrontend {
-public:
- explicit GDBStub(DebuggerBackend& backend, Core::System& system,
- Kernel::KProcess* debug_process);
+struct GDBStub : public DebuggerFrontend {
+ explicit GDBStub(DebuggerBackend& backend, Core::System& system, Kernel::KProcess* debug_process);
~GDBStub() override;
-
void Connected() override;
void Stopped(Kernel::KThread* thread) override;
void ShuttingDown() override;
void Watchpoint(Kernel::KThread* thread, const Kernel::DebugWatchpoint& watch) override;
std::vector<DebuggerAction> ClientData(std::span<const u8> data) override;
-
-private:
void ProcessData(std::vector<DebuggerAction>& actions);
void ExecuteCommand(std::string_view packet, std::vector<DebuggerAction>& actions);
void HandleVCont(std::string_view command, std::vector<DebuggerAction>& actions);
@@ -47,14 +45,8 @@ private:
std::vector<char>::const_iterator CommandEnd() const;
std::optional<std::string> DetachCommand();
Kernel::KThread* GetThreadByID(u64 thread_id);
-
void SendReply(std::string_view data);
void SendStatus(char status);
-
- Kernel::KProcess* GetProcess();
- Core::Memory::Memory& GetMemory();
-
-private:
Core::System& system;
Kernel::KProcess* debug_process;
std::unique_ptr<GDBStubArch> arch;