[Lldb-commits] [PATCH] D102562: Fix to the interrupt timeout handling: reset the timeout on re-entry
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat May 15 15:44:49 PDT 2021
jingham updated this revision to Diff 345654.
jingham added a comment.
It's less error-prone if we just reset the timeout to the default when we wake up from ReadPacket. This isn't an expensive operation...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102562/new/
https://reviews.llvm.org/D102562
Files:
lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
@@ -61,6 +61,9 @@
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<std::mutex> lock(m_mutex);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102562.345654.patch
Type: text/x-patch
Size: 744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210515/091e3c7e/attachment.bin>
More information about the lldb-commits
mailing list