mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
Handle GDB server reconnections
This commit is contained in:
parent
5e65fd8808
commit
de4ec65bd7
1 changed files with 43 additions and 32 deletions
|
@ -6,6 +6,7 @@ using Ryujinx.HLE.HOS.Kernel;
|
||||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
@ -615,6 +616,8 @@ namespace Ryujinx.HLE.Debugger
|
||||||
Logger.Notice.Print(LogClass.GdbStub, "GDB client connected");
|
Logger.Notice.Print(LogClass.GdbStub, "GDB client connected");
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
switch (ReadStream.ReadByte())
|
switch (ReadStream.ReadByte())
|
||||||
{
|
{
|
||||||
|
@ -653,9 +656,17 @@ namespace Ryujinx.HLE.Debugger
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (IOException)
|
||||||
|
{
|
||||||
|
goto eof;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
eof:
|
eof:
|
||||||
Logger.Notice.Print(LogClass.GdbStub, "GDB client lost connection");
|
Logger.Notice.Print(LogClass.GdbStub, "GDB client lost connection");
|
||||||
|
ReadStream.Close();
|
||||||
|
WriteStream.Close();
|
||||||
|
ClientSocket.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue