[Lldb-commits] [lldb] r181493 - Fix the error reporting for ProcessKDP::DoDetach.

Jim Ingham jingham at apple.com
Wed May 8 17:05:35 PDT 2013


Author: jingham
Date: Wed May  8 19:05:35 2013
New Revision: 181493

URL: http://llvm.org/viewvc/llvm-project?rev=181493&view=rev
Log:
Fix the error reporting for ProcessKDP::DoDetach.

Modified:
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=181493&r1=181492&r2=181493&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Wed May  8 19:05:35 2013
@@ -541,15 +541,20 @@ ProcessKDP::DoDetach(bool keep_stopped)
         if (!keep_stopped && m_comm.IsConnected())
         {
 
-            m_comm.SendRequestDisconnect();
+            bool disconnect_success = m_comm.SendRequestDisconnect();
+            if (!disconnect_success)
+            {
+                if (log)
+                    log->PutCString ("ProcessKDP::DoDetach(): send disconnect request failed");
+            }
 
-            size_t response_size = m_comm.Disconnect ();
+            ConnectionStatus comm_disconnect_result = m_comm.Disconnect ();
             if (log)
             {
-                if (response_size)
-                    log->PutCString ("ProcessKDP::DoDetach() detach packet sent successfully");
+                if (comm_disconnect_result == eConnectionStatusSuccess)
+                    log->PutCString ("ProcessKDP::DoDetach() conncection channel shutdown successfully");
                 else
-                    log->PutCString ("ProcessKDP::DoDetach() detach packet send failed");
+                    log->PutCString ("ProcessKDP::DoDetach() connection channel shutdown failed");
             }
         }
     }





More information about the lldb-commits mailing list