mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 02:26:23 +02:00
Compare commits
27 commits
8fa675de7b
...
1b37038d5a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1b37038d5a | ||
![]() |
cd2a7c9916 | ||
![]() |
669179ca2e | ||
![]() |
b1c1ad54e8 | ||
![]() |
c4abaa6cf2 | ||
![]() |
c5c8647de7 | ||
![]() |
838296ccb6 | ||
![]() |
009d319bc2 | ||
![]() |
7d189ab2c0 | ||
![]() |
bad1dd8899 | ||
![]() |
7d5f7bc479 | ||
![]() |
44f4e9af51 | ||
![]() |
fe02ff3a3a | ||
![]() |
9506eba982 | ||
![]() |
5cad23f793 | ||
![]() |
fb1655f1ad | ||
![]() |
f630d5ba99 | ||
![]() |
bc68502179 | ||
![]() |
e547c4f5f4 | ||
![]() |
36bb910e67 | ||
![]() |
785641a402 | ||
![]() |
d81dca0dcc | ||
![]() |
737afbfa2f | ||
![]() |
8682c51ef7 | ||
![]() |
bbbbaaa669 | ||
![]() |
890165707a | ||
![]() |
0cc94fdf37 |
2 changed files with 289 additions and 279 deletions
File diff suppressed because it is too large
Load diff
|
@ -32,6 +32,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
private Thread DebuggerThread;
|
||||
private Thread MessageHandlerThread;
|
||||
private bool _shuttingDown = false;
|
||||
private ManualResetEventSlim _breakHandlerEvent = new ManualResetEventSlim(false);
|
||||
|
||||
private ulong? cThread;
|
||||
private ulong? gThread;
|
||||
|
@ -237,6 +238,7 @@ namespace Ryujinx.HLE.Debugger
|
|||
case ThreadBreakMessage { Context: var ctx }:
|
||||
DebugProcess.DebugStop();
|
||||
gThread = cThread = ctx.ThreadUid;
|
||||
_breakHandlerEvent.Set();
|
||||
Reply($"T05thread:{ctx.ThreadUid:x};");
|
||||
break;
|
||||
|
||||
|
@ -860,6 +862,9 @@ namespace Ryujinx.HLE.Debugger
|
|||
}
|
||||
catch (InvalidMemoryRegionException)
|
||||
{
|
||||
// InvalidAccessHandler will show an error message, we log it again to tell user the error is from GDB (which can be ignored)
|
||||
// TODO: Do not let InvalidAccessHandler show the error message
|
||||
Logger.Notice.Print(LogClass.GdbStub, $"GDB failed to read memory at 0x{addr:X16}");
|
||||
ReplyError();
|
||||
}
|
||||
}
|
||||
|
@ -1266,15 +1271,20 @@ namespace Ryujinx.HLE.Debugger
|
|||
Messages.Add(new KillMessage());
|
||||
MessageHandlerThread.Join();
|
||||
Messages.Dispose();
|
||||
_breakHandlerEvent.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void BreakHandler(IExecutionContext ctx, ulong address, int imm)
|
||||
{
|
||||
Logger.Notice.Print(LogClass.GdbStub, $"Break hit on thread {ctx.ThreadUid} at pc {address:x016}");
|
||||
|
||||
Messages.Add(new ThreadBreakMessage(ctx, address, imm));
|
||||
DebugProcess.DebugInterruptHandler(ctx);
|
||||
|
||||
_breakHandlerEvent.Reset();
|
||||
Messages.Add(new ThreadBreakMessage(ctx, address, imm));
|
||||
// Messages.Add can block, so we log it after adding the message to make sure user can see the log at the same time GDB receives the break message
|
||||
Logger.Notice.Print(LogClass.GdbStub, $"Break hit on thread {ctx.ThreadUid} at pc {address:x016}");
|
||||
// Wait for the process to stop before returning to avoid BreakHander being called multiple times from the same breakpoint
|
||||
_breakHandlerEvent.Wait(5000);
|
||||
}
|
||||
|
||||
public void StepHandler(IExecutionContext ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue