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

Greg Clayton gclayton at apple.com
Wed Feb 2 17:07:45 PST 2011


Author: gclayton
Date: Wed Feb  2 19:07:45 2011
New Revision: 124766

URL: http://llvm.org/viewvc/llvm-project?rev=124766&view=rev
Log:
Fixed the SendInterrupt logic to return the true if the target was halted
(regardless if the interrupt was sent), and false of not.


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=124766&r1=124765&r2=124766&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Wed Feb  2 19:07:45 2011
@@ -533,23 +533,31 @@
                 sent_interrupt = true;
                 if (seconds_to_wait_for_stop)
                 {
-                    m_private_is_running.WaitForValueEqualTo (false, &timeout, &timed_out);
-                    if (log)
-                        log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, private state stopped", __FUNCTION__);
-
+                    if (m_private_is_running.WaitForValueEqualTo (false, &timeout, &timed_out))
+                    {
+                        if (log)
+                            log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, private state stopped", __FUNCTION__);
+                        return true;
+                    }
+                    else
+                    {
+                        if (log)
+                            log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, timed out wating for async thread resume", __FUNCTION__);
+                    }
                 }
                 else
                 {
                     if (log)
                         log->Printf ("GDBRemoteCommunication::%s () - sent interrupt, not waiting for stop...", __FUNCTION__);                    
+                    return true;
                 }
-                return true;
             }
             else
             {
                 if (log)
                     log->Printf ("GDBRemoteCommunication::%s () - failed to write interrupt", __FUNCTION__);
             }
+            return false;
         }
         else
         {
@@ -557,7 +565,7 @@
                 log->Printf ("GDBRemoteCommunication::%s () - got sequence mutex without having to interrupt", __FUNCTION__);
         }
     }
-    return false;
+    return true;
 }
 
 bool





More information about the lldb-commits mailing list