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;
+    }
   }
 }
 


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;
+    }
   }
 }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PAT... Jonas Devlieghere via Phabricator via lldb-commits

Reply via email to