mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
GDB Stub: do not send a packet when we just connected
This commit is contained in:
@ -61,6 +61,7 @@ enum class BreakpointType
|
||||
const s64 GDB_UPDATE_CYCLES = 100000;
|
||||
|
||||
static bool s_has_control = false;
|
||||
static bool s_just_connected = false;
|
||||
|
||||
static int s_tmpsock = -1;
|
||||
static int s_sock = -1;
|
||||
@ -898,6 +899,7 @@ static void HandleRemoveBreakpoint()
|
||||
|
||||
void ProcessCommands(bool loop_until_continue)
|
||||
{
|
||||
s_just_connected = false;
|
||||
while (IsActive())
|
||||
{
|
||||
if (CPU::GetState() == CPU::State::PowerDown)
|
||||
@ -1038,6 +1040,7 @@ static void InitGeneric(int domain, const sockaddr* server_addr, socklen_t serve
|
||||
if (s_sock < 0)
|
||||
ERROR_LOG_FMT(GDB_STUB, "Failed to accept gdb client");
|
||||
INFO_LOG_FMT(GDB_STUB, "Client connected.");
|
||||
s_just_connected = true;
|
||||
|
||||
#ifdef _WIN32
|
||||
closesocket(s_tmpsock);
|
||||
@ -1083,6 +1086,11 @@ void TakeControl()
|
||||
s_has_control = true;
|
||||
}
|
||||
|
||||
bool JustConnected()
|
||||
{
|
||||
return s_just_connected;
|
||||
}
|
||||
|
||||
void SendSignal(Signal signal)
|
||||
{
|
||||
char bfr[128] = {};
|
||||
|
Reference in New Issue
Block a user