mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-12 16:25:46 +00:00
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
This commit is contained in:
47
src/Ryujinx.HLE/Debugger/IMessage.cs
Normal file
47
src/Ryujinx.HLE/Debugger/IMessage.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user