[Lldb-commits] [lldb] r364722 - Revert "[GDBRemote] Remove code that flushes GDB remote packets"

2019-06-30 Thread Jonas Devlieghere via lldb-commits
Author: jdevlieghere
Date: Sun Jun 30 12:00:09 2019
New Revision: 364722

URL: http://llvm.org/viewvc/llvm-project?rev=364722&view=rev
Log:
Revert "[GDBRemote] Remove code that flushes GDB remote packets"

Reverting this again as it doesn't appear to solve the flakiness on the
LLDB standalone bot.

Modified:

lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp

Modified: 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=364722&r1=364721&r2=364722&view=diff
==
--- 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp 
Sun Jun 30 12:00:09 2019
@@ -115,6 +115,13 @@ bool GDBRemoteCommunicationClient::Hands
   // Start the read thread after we send the handshake ack since if we fail to
   // send the handshake ack, there is no reason to continue...
   if (SendAck()) {
+// Wait for any responses that might have been queued up in the remote
+// GDB server and flush them all
+StringExtractorGDBRemote response;
+PacketResult packet_result = PacketResult::Success;
+while (packet_result == PacketResult::Success)
+  packet_result = ReadPacket(response, milliseconds(10), false);
+
 // The return value from QueryNoAckModeSupported() is true if the packet
 // was sent and _any_ response (including UNIMPLEMENTED) was received), or
 // false if no response was received. This quickly tells us if we have a


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D63165: Initial support for native debugging of x86/x64 Windows processes

2019-06-30 Thread Aaron Smith via Phabricator via lldb-commits
asmith added inline comments.



Comment at: 
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp:31-36
+  if (!data_sp) {
+error.SetErrorStringWithFormat(
+"failed to allocate DataBufferHeap instance of size %" PRIu64,
+data_size);
+return error;
+  }

labath wrote:
> `new` doesn't fail. This is dead code.
The code is copied from/following the other targets. Maybe all the targets 
could be cleaned up in another PR. For example Arm64,

NativeRegisterContextLinux_arm64::ReadAllRegisterValues()
  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
  if (!data_sp)



Comment at: 
lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp:52-57
+  if (dst == nullptr) {
+error.SetErrorStringWithFormat("DataBufferHeap instance of size %" PRIu64
+   " returned a null pointer",
+   data_size);
+return error;
+  }

labath wrote:
> This can't ever be true.
Copied from Arm64


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63165/new/

https://reviews.llvm.org/D63165



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits