mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 06:46:24 +02:00
Compare commits
6 commits
bb39576582
...
399a4630aa
Author | SHA1 | Date | |
---|---|---|---|
![]() |
399a4630aa | ||
![]() |
eb41143988 | ||
![]() |
745200373b | ||
![]() |
2e18008d4b | ||
![]() |
84e078f94c | ||
![]() |
2c01f30f41 |
6 changed files with 18 additions and 7 deletions
|
@ -3,7 +3,6 @@ using ARMeilleure.State;
|
||||||
using ARMeilleure.Translation;
|
using ARMeilleure.Translation;
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
|
||||||
using ExecutionContext = ARMeilleure.State.ExecutionContext;
|
using ExecutionContext = ARMeilleure.State.ExecutionContext;
|
||||||
|
|
||||||
namespace ARMeilleure.Instructions
|
namespace ARMeilleure.Instructions
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using ARMeilleure.Memory;
|
using ARMeilleure.Memory;
|
||||||
using System.Collections.Concurrent;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace ARMeilleure.State
|
namespace ARMeilleure.State
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using ARMeilleure.Memory;
|
using ARMeilleure.Memory;
|
||||||
using ARMeilleure.State;
|
using ARMeilleure.State;
|
||||||
using System.Threading;
|
|
||||||
using ExecutionContext = ARMeilleure.State.ExecutionContext;
|
using ExecutionContext = ARMeilleure.State.ExecutionContext;
|
||||||
|
|
||||||
namespace Ryujinx.Cpu.Jit
|
namespace Ryujinx.Cpu.Jit
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace Ryujinx.HLE.Debugger
|
||||||
MessageHandlerThread.Start();
|
MessageHandlerThread.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IDebuggableProcess DebugProcess => Device.System.DebugGetApplicationProcess();
|
private IDebuggableProcess DebugProcess => Device.System?.DebugGetApplicationProcess();
|
||||||
private KThread[] GetThreads() => DebugProcess.GetThreadUids().Select(x => DebugProcess.GetThread(x)).ToArray();
|
private KThread[] GetThreads() => DebugProcess.GetThreadUids().Select(x => DebugProcess.GetThread(x)).ToArray();
|
||||||
private bool IsProcessAarch32 => DebugProcess.GetThread(gThread.Value).Context.IsAarch32;
|
private bool IsProcessAarch32 => DebugProcess.GetThread(gThread.Value).Context.IsAarch32;
|
||||||
private KernelContext KernelContext => Device.System.KernelContext;
|
private KernelContext KernelContext => Device.System.KernelContext;
|
||||||
|
@ -761,6 +761,20 @@ namespace Ryujinx.HLE.Debugger
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user connects before the application is running, wait for the application to start.
|
||||||
|
int retries = 10;
|
||||||
|
while (DebugProcess == null && retries-- > 0)
|
||||||
|
{
|
||||||
|
Thread.Sleep(200);
|
||||||
|
}
|
||||||
|
if (DebugProcess == null)
|
||||||
|
{
|
||||||
|
Logger.Warning?.Print(LogClass.GdbStub, "Application is not running, cannot accept GDB client connection");
|
||||||
|
ClientSocket.Close();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ClientSocket.NoDelay = true;
|
ClientSocket.NoDelay = true;
|
||||||
ReadStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Read);
|
ReadStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Read);
|
||||||
WriteStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Write);
|
WriteStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Write);
|
||||||
|
|
|
@ -689,6 +689,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||||
{
|
{
|
||||||
mainThread.Suspend(ThreadSchedState.ThreadPauseFlag);
|
mainThread.Suspend(ThreadSchedState.ThreadPauseFlag);
|
||||||
debugState = (int)DebugState.Stopped;
|
debugState = (int)DebugState.Stopped;
|
||||||
|
Logger.Notice.Print(LogClass.Kernel, $"Application is suspended on start for debugging.");
|
||||||
}
|
}
|
||||||
|
|
||||||
result = mainThread.Start();
|
result = mainThread.Start();
|
||||||
|
@ -742,7 +743,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||||
ExceptionCallback breakCallback = null;
|
ExceptionCallback breakCallback = null;
|
||||||
ExceptionCallbackNoArgs stepCallback = null;
|
ExceptionCallbackNoArgs stepCallback = null;
|
||||||
|
|
||||||
if (KernelContext.Device.Configuration.EnableGdbStub)
|
if (KernelContext.Device.Configuration.EnableGdbStub && KernelContext.Device.Debugger != null)
|
||||||
{
|
{
|
||||||
breakCallback = KernelContext.Device.Debugger.BreakHandler;
|
breakCallback = KernelContext.Device.Debugger.BreakHandler;
|
||||||
stepCallback = KernelContext.Device.Debugger.StepHandler;
|
stepCallback = KernelContext.Device.Debugger.StepHandler;
|
||||||
|
|
|
@ -176,7 +176,7 @@ namespace Ryujinx.HLE
|
||||||
AudioDeviceDriver.Dispose();
|
AudioDeviceDriver.Dispose();
|
||||||
FileSystem.Dispose();
|
FileSystem.Dispose();
|
||||||
Memory.Dispose();
|
Memory.Dispose();
|
||||||
Debugger.Dispose();
|
Debugger?.Dispose();
|
||||||
|
|
||||||
TitleIDs.CurrentApplication.Value = null;
|
TitleIDs.CurrentApplication.Value = null;
|
||||||
Shared = null;
|
Shared = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue