[Lldb-commits] [lldb] r135461 - /lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Johnny Chen johnny.chen at apple.com
Mon Jul 18 18:13:00 PDT 2011


Author: johnny
Date: Mon Jul 18 20:13:00 2011
New Revision: 135461

URL: http://llvm.org/viewvc/llvm-project?rev=135461&view=rev
Log:
Initialize the all important automatic variable 'lldb::ConnectionStatus status' before
invoking the Read(...) method to read in bytes.  This seems to fix the infinite looping
I was seeing on SnowLeopard while running the test suite.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=135461&r1=135460&r2=135461&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Mon Jul 18 20:13:00 2011
@@ -199,7 +199,7 @@
     bool timed_out = false;
     while (IsConnected() && !timed_out)
     {
-        lldb::ConnectionStatus status;
+        lldb::ConnectionStatus status = eConnectionStatusNoConnection;
         size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
         
         if (log)





More information about the lldb-commits mailing list