[Lldb-commits] [PATCH] D97017: [lldb-server] Exit the DataAvailableCallback loop when `done` or `interrupt` are set

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 18 19:06:28 PST 2021


JDevlieghere created this revision.
JDevlieghere added reviewers: labath, omjavaid.
JDevlieghere requested review of this revision.

When looking at `GDBRemoteCommunicationServerLLGS::DataAvailableCallback` I noticed that the `done` and `interrupt` flags are currently being ignored. I assumed the reason is that `GetPacketAndSendResponse ` always returns either `PacketResult::Success` or `PacketResult::ErrorReplyTimeout` but there are plenty of code paths that return `PacketResult::Success` but set `done` or `interrupt` to true.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D97017

Files:
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp


Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -1060,6 +1060,11 @@
       m_mainloop.RequestTermination();
       break;
     }
+
+    if (done || interrupt) {
+      m_mainloop.RequestTermination();
+      break;
+    }
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97017.324840.patch
Type: text/x-patch
Size: 498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210219/3a0f91c5/attachment.bin>


More information about the lldb-commits mailing list