mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-03-17 20:11:06 +00:00
- 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
48 lines
1.1 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|