aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-06-17 01:22:15 +0000
committerGreg Clayton <gclayton@apple.com>2011-06-17 01:22:15 +0000
commit73bf5dbd16d91cc70da178f4bf3fecc96471f7c2 (patch)
tree0af9a600c375f2376a73be9d0f49ce8b969c6c0b /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
parent2cd8327605091d34bfcbc0a61901c7ad3bfb996c (diff)
downloadllvm-73bf5dbd16d91cc70da178f4bf3fecc96471f7c2.zip
llvm-73bf5dbd16d91cc70da178f4bf3fecc96471f7c2.tar.gz
llvm-73bf5dbd16d91cc70da178f4bf3fecc96471f7c2.tar.bz2
Improved the packet throughput when debugging with GDB remote by over 3x on
darwin (not sure about other platforms). Modified the communication and connection classes to not require the BytesAvailable function. Now the "Read(...)" function has a timeout in microseconds. Fixed a lot of assertions that were firing off in certain cases and replaced them with error output and code that can deal with the assertion case. llvm-svn: 133224
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 9379077..0619c10 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -78,13 +78,13 @@ GDBRemoteCommunicationServer::~GDBRemoteCommunicationServer()
//}
//
bool
-GDBRemoteCommunicationServer::GetPacketAndSendResponse (const TimeValue* timeout_ptr,
+GDBRemoteCommunicationServer::GetPacketAndSendResponse (uint32_t timeout_usec,
Error &error,
bool &interrupt,
bool &quit)
{
StringExtractorGDBRemote packet;
- if (WaitForPacketNoLock (packet, timeout_ptr))
+ if (WaitForPacketWithTimeoutMicroSeconds(packet, timeout_usec))
{
const StringExtractorGDBRemote::ServerPacketType packet_type = packet.GetServerPacketType ();
switch (packet_type)
@@ -199,9 +199,7 @@ GDBRemoteCommunicationServer::SendOKResponse ()
bool
GDBRemoteCommunicationServer::HandshakeWithClient(Error *error_ptr)
{
- if (StartReadThread(error_ptr))
- return GetAck();
- return false;
+ return GetAck();
}
bool
@@ -517,7 +515,7 @@ AcceptPortFromInferior (void *arg)
char pid_str[256];
::memset (pid_str, 0, sizeof(pid_str));
ConnectionStatus status;
- const size_t pid_str_len = file_conn.Read (pid_str, sizeof(pid_str), status, NULL);
+ const size_t pid_str_len = file_conn.Read (pid_str, sizeof(pid_str), NULL, status, NULL);
if (pid_str_len > 0)
{
int pid = atoi (pid_str);