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
diff --git a/lldb/tools/lldb-platform/lldb-platform.cpp b/lldb/tools/lldb-platform/lldb-platform.cpp
index 2dc54af..bc7896b 100644
--- a/lldb/tools/lldb-platform/lldb-platform.cpp
+++ b/lldb/tools/lldb-platform/lldb-platform.cpp
@@ -72,7 +72,7 @@
StreamSP log_stream_sp;
Args log_args;
Error error;
- std::string listen_host_post;
+ std::string listen_host_port;
char ch;
Debugger::Initialize();
@@ -163,7 +163,7 @@
break;
case 'L':
- listen_host_post.append (optarg);
+ listen_host_port.append (optarg);
break;
}
}
@@ -181,15 +181,15 @@
GDBRemoteCommunicationServer gdb_server (true);
- if (!listen_host_post.empty())
+ if (!listen_host_port.empty())
{
std::auto_ptr<ConnectionFileDescriptor> conn_ap(new ConnectionFileDescriptor());
if (conn_ap.get())
{
std::string connect_url ("listen://");
- connect_url.append(listen_host_post.c_str());
+ connect_url.append(listen_host_port.c_str());
- printf ("Listening for a connection on %s...\n", listen_host_post.c_str());
+ printf ("Listening for a connection on %s...\n", listen_host_port.c_str());
if (conn_ap->Connect(connect_url.c_str(), &error) == eConnectionStatusSuccess)
{
printf ("Connection established.\n");
@@ -208,7 +208,7 @@
bool done = false;
while (!interrupt && !done)
{
- if (!gdb_server.GetPacketAndSendResponse(NULL, error, interrupt, done))
+ if (!gdb_server.GetPacketAndSendResponse (UINT32_MAX, error, interrupt, done))
break;
}
}