From 73bf5dbd16d91cc70da178f4bf3fecc96471f7c2 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 17 Jun 2011 01:22:15 +0000 Subject: 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 --- lldb/tools/lldb-platform/lldb-platform.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/tools/lldb-platform') diff --git a/lldb/tools/lldb-platform/lldb-platform.cpp b/lldb/tools/lldb-platform/lldb-platform.cpp index 2dc54af2f7b..bc7896b4572 100644 --- a/lldb/tools/lldb-platform/lldb-platform.cpp +++ b/lldb/tools/lldb-platform/lldb-platform.cpp @@ -72,7 +72,7 @@ main (int argc, char *argv[]) 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 @@ main (int argc, char *argv[]) break; case 'L': - listen_host_post.append (optarg); + listen_host_port.append (optarg); break; } } @@ -181,15 +181,15 @@ main (int argc, char *argv[]) GDBRemoteCommunicationServer gdb_server (true); - if (!listen_host_post.empty()) + if (!listen_host_port.empty()) { std::auto_ptr 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 @@ main (int argc, char *argv[]) bool done = false; while (!interrupt && !done) { - if (!gdb_server.GetPacketAndSendResponse(NULL, error, interrupt, done)) + if (!gdb_server.GetPacketAndSendResponse (UINT32_MAX, error, interrupt, done)) break; } } -- cgit v1.2.3