From bd5751f3d249ec0798060bd98c07272174c52af0 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Sat, 15 May 2021 14:59:14 -0700 Subject: [PATCH] Reset the wakeup timeout when we re-enter the continue wait. Differential Revision: https://reviews.llvm.org/D102562 --- lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp index 61429b7..a4c71e8 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp @@ -61,6 +61,9 @@ StateType GDBRemoteClientBase::SendContinuePacketAndWaitForResponse( kWakeupInterval); for (;;) { PacketResult read_result = ReadPacket(response, computed_timeout, false); + // Reset the computed_timeout to the default value in case we are going + // round again. + computed_timeout = std::min(interrupt_timeout, kWakeupInterval); switch (read_result) { case PacketResult::ErrorReplyTimeout: { std::lock_guard lock(m_mutex); -- 2.7.4