mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-14 02:02:54 +00:00
Compare commits
2 Commits
Canary-1.3
...
Canary-1.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e941e4a8f | ||
|
|
9aacf9b37b |
@@ -3629,7 +3629,7 @@
|
||||
"he_IL": "ממשק קלאסי (הפעלה מחדש דרושה)",
|
||||
"it_IT": "Interfaccia classica (Riavvio necessario)",
|
||||
"ja_JP": "クラシックインターフェース(再起動必要)",
|
||||
"ko_KR": "클래식 인터페이스 (재시작 필요)",
|
||||
"ko_KR": "클래식 인터페이스(다시 시작 필요)",
|
||||
"no_NO": "Klassisk grensesnitt (Krever omstart)",
|
||||
"pl_PL": "Klasyczny interfejs (Wymaga restartu)",
|
||||
"pt_BR": "Interface Clássica (Reinício necessário)",
|
||||
|
||||
@@ -11,12 +11,9 @@ namespace Ryujinx.HLE.Debugger
|
||||
{
|
||||
public byte[] OriginalData { get; }
|
||||
|
||||
public bool IsStep { get; }
|
||||
|
||||
public Breakpoint(byte[] originalData, bool isStep)
|
||||
public Breakpoint(byte[] originalData)
|
||||
{
|
||||
OriginalData = originalData;
|
||||
IsStep = isStep;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +41,7 @@ namespace Ryujinx.HLE.Debugger
|
||||
/// <param name="length">The length of the instruction to replace.</param>
|
||||
/// <param name="isStep">Indicates if this is a single-step breakpoint.</param>
|
||||
/// <returns>True if the breakpoint was set successfully; otherwise, false.</returns>
|
||||
public bool SetBreakPoint(ulong address, ulong length, bool isStep = false)
|
||||
public bool SetBreakPoint(ulong address, ulong length)
|
||||
{
|
||||
if (_breakpoints.ContainsKey(address))
|
||||
{
|
||||
@@ -71,7 +68,7 @@ namespace Ryujinx.HLE.Debugger
|
||||
return false;
|
||||
}
|
||||
|
||||
var breakpoint = new Breakpoint(originalInstruction, isStep);
|
||||
var breakpoint = new Breakpoint(originalInstruction);
|
||||
if (_breakpoints.TryAdd(address, breakpoint))
|
||||
{
|
||||
Logger.Debug?.Print(LogClass.GdbStub, $"Breakpoint set at 0x{address:X16}");
|
||||
@@ -124,30 +121,6 @@ namespace Ryujinx.HLE.Debugger
|
||||
Logger.Debug?.Print(LogClass.GdbStub, "All breakpoints cleared.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all currently set single-step software breakpoints.
|
||||
/// </summary>
|
||||
public void ClearAllStepBreakpoints()
|
||||
{
|
||||
var stepBreakpoints = _breakpoints.Where(p => p.Value.IsStep).ToList();
|
||||
|
||||
if (stepBreakpoints.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var bp in stepBreakpoints)
|
||||
{
|
||||
if (_breakpoints.TryRemove(bp.Key, out Breakpoint removedBreakpoint))
|
||||
{
|
||||
WriteMemory(bp.Key, removedBreakpoint.OriginalData);
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Debug?.Print(LogClass.GdbStub, "All step breakpoints cleared.");
|
||||
}
|
||||
|
||||
|
||||
private byte[] GetBreakInstruction(ulong length)
|
||||
{
|
||||
if (_debugger.IsProcessAarch32)
|
||||
|
||||
@@ -103,6 +103,10 @@ namespace Ryujinx.HLE.Debugger
|
||||
{
|
||||
Logger.Error?.Print(LogClass.GdbStub, "Error while processing GDB messages", e);
|
||||
}
|
||||
catch (ObjectDisposedException e)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.GdbStub, "Error while processing GDB messages", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +308,7 @@ namespace Ryujinx.HLE.Debugger
|
||||
WriteStream = null;
|
||||
ClientSocket.Close();
|
||||
ClientSocket = null;
|
||||
CommandProcessor = null;
|
||||
|
||||
BreakpointManager.ClearAll();
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace Ryujinx.HLE.Debugger.Gdb
|
||||
switch (type)
|
||||
{
|
||||
case "0": // Software breakpoint
|
||||
if (!Commands.Debugger.BreakpointManager.SetBreakPoint(addr, len, false))
|
||||
if (!Commands.Debugger.BreakpointManager.SetBreakPoint(addr, len))
|
||||
{
|
||||
Commands.ReplyError();
|
||||
return;
|
||||
@@ -325,7 +325,7 @@ namespace Ryujinx.HLE.Debugger.Gdb
|
||||
Commands.ReplyError();
|
||||
return;
|
||||
default:
|
||||
Commands. ReplyError();
|
||||
Commands.ReplyError();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Ryujinx.HLE.Debugger
|
||||
|
||||
private static string GetEmbeddedResourceContent(string resourceName)
|
||||
{
|
||||
Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Ryujinx.HLE.Debugger.GdbXml." + resourceName);
|
||||
Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("Ryujinx.HLE.Debugger.Gdb.Xml." + resourceName);
|
||||
StreamReader reader = new StreamReader(stream);
|
||||
string result = reader.ReadToEnd();
|
||||
reader.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user