Files
ryujinx/src/Ryujinx.HLE/Debugger/IMessage.cs
GreemDev 247e2e03d6 gdb: More cleanup changes
- Move the message handler into its debugger class part,
- Move all message types into one file and collapse 3 of the ones with no data into a generic, stateless message with a single property being its type,
- Add an Fpscr helper property on IExecutionContext along with a comment about what Fpscr is (similar to the other registers in there)
- Moved the Rcmd helpers (such as GetRegisters, GetMinidump, etc) into a dedicated Debugger class part,
- Fixed the double-collection (ToArray being called twice) in GetThreadUids & GetThread in KProcess
2025-10-19 04:26:12 -05:00

48 lines
1.1 KiB
C#

using Ryujinx.Cpu;
namespace Ryujinx.HLE.Debugger
{
/// <summary>
/// Marker interface for debugger messages.
/// </summary>
interface IMessage;
public enum MessageType
{
Kill,
BreakIn,
SendNack
}
record struct StatelessMessage(MessageType Type) : IMessage
{
public static StatelessMessage Kill => new(MessageType.Kill);
public static StatelessMessage BreakIn => new(MessageType.BreakIn);
public static StatelessMessage SendNack => new(MessageType.SendNack);
}
struct CommandMessage : IMessage
{
public readonly string Command;
public CommandMessage(string cmd)
{
Command = cmd;
}
}
public class ThreadBreakMessage : IMessage
{
public IExecutionContext Context { get; }
public ulong Address { get; }
public int Opcode { get; }
public ThreadBreakMessage(IExecutionContext context, ulong address, int opcode)
{
Context = context;
Address = address;
Opcode = opcode;
}
}
}