diff options
| author | Greg Clayton <gclayton@apple.com> | 2011-06-17 01:22:15 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2011-06-17 01:22:15 +0000 |
| commit | 73bf5dbd16d91cc70da178f4bf3fecc96471f7c2 (patch) | |
| tree | 0af9a600c375f2376a73be9d0f49ce8b969c6c0b /lldb/tools/lldb-platform | |
| parent | 2cd8327605091d34bfcbc0a61901c7ad3bfb996c (diff) | |
| download | bcm5719-llvm-73bf5dbd16d91cc70da178f4bf3fecc96471f7c2.tar.gz bcm5719-llvm-73bf5dbd16d91cc70da178f4bf3fecc96471f7c2.zip | |
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/tools/lldb-platform')
| -rw-r--r-- | lldb/tools/lldb-platform/lldb-platform.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<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 @@ 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; } } |

