aboutsummaryrefslogtreecommitdiff
path: root/src/core/debugger/debugger_interface.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/debugger_interface.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/debugger_interface.h')
-rw-r--r--src/core/debugger/debugger_interface.h45
1 files changed, 15 insertions, 30 deletions
diff --git a/src/core/debugger/debugger_interface.h b/src/core/debugger/debugger_interface.h
index 5b31edc430..4e18749249 100644
--- a/src/core/debugger/debugger_interface.h
+++ b/src/core/debugger/debugger_interface.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
@@ -28,26 +31,18 @@ class DebuggerBackend {
public:
virtual ~DebuggerBackend() = default;
- /**
- * Can be invoked from a callback to synchronously wait for more data.
- * Will return as soon as least one byte is received. Reads up to 4096 bytes.
- */
+ /// Can be invoked from a callback to synchronously wait for more data.
+ /// Will return as soon as least one byte is received. Reads up to 4096 bytes.
virtual std::span<const u8> ReadFromClient() = 0;
- /**
- * Can be invoked from a callback to write data to the client.
- * Returns immediately after the data is sent.
- */
+ /// Can be invoked from a callback to write data to the client.
+ /// Returns immediately after the data is sent.
virtual void WriteToClient(std::span<const u8> data) = 0;
- /**
- * Gets the currently active thread when the debugger is stopped.
- */
+ /// Gets the currently active thread when the debugger is stopped.
virtual Kernel::KThread* GetActiveThread() = 0;
- /**
- * Sets the currently active thread when the debugger is stopped.
- */
+ /// Sets the currently active thread when the debugger is stopped.
virtual void SetActiveThread(Kernel::KThread* thread) = 0;
};
@@ -57,30 +52,20 @@ public:
virtual ~DebuggerFrontend() = default;
- /**
- * Called after the client has successfully connected to the port.
- */
+ /// Called after the client has successfully connected to the port.
virtual void Connected() = 0;
- /**
- * Called when emulation has stopped.
- */
+ /// Called when emulation has stopped.
virtual void Stopped(Kernel::KThread* thread) = 0;
- /**
- * Called when emulation is shutting down.
- */
+ /// Called when emulation is shutting down.
virtual void ShuttingDown() = 0;
- /*
- * Called when emulation has stopped on a watchpoint.
- */
+ /// Called when emulation has stopped on a watchpoint.
virtual void Watchpoint(Kernel::KThread* thread, const Kernel::DebugWatchpoint& watch) = 0;
- /**
- * Called when new data is asynchronously received on the client socket.
- * A list of actions to perform is returned.
- */
+ /// Called when new data is asynchronously received on the client socket.
+ /// A list of actions to perform is returned.
[[nodiscard]] virtual std::vector<DebuggerAction> ClientData(std::span<const u8> data) = 0;
protected: