[Lldb-commits] [PATCH 2/9] Only enqueue valid ProcessLinux messages.

Stephen Wilson wilsons at start.ca
Tue Jan 18 14:39:08 PST 2011


diff --git a/source/Plugins/Process/Linux/ProcessLinux.cpp b/source/Plugins/Process/Linux/ProcessLinux.cpp
index d7fe1da..0e8774f 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -244,7 +244,6 @@ void
 ProcessLinux::SendMessage(const ProcessMessage &message)
 {
     Mutex::Locker lock(m_message_mutex);
-    m_message_queue.push(message);
 
     switch (message.GetKind())
     {
@@ -252,6 +251,9 @@ ProcessLinux::SendMessage(const ProcessMessage &message)
         SetPrivateState(eStateStopped);
         break;
 
+    case ProcessMessage::eInvalidMessage:
+        return;
+
     case ProcessMessage::eExitMessage:
         SetExitStatus(message.GetExitStatus(), NULL);
         break;
@@ -260,6 +262,8 @@ ProcessLinux::SendMessage(const ProcessMessage &message)
         SetExitStatus(-1, NULL);
         break;
     }
+
+    m_message_queue.push(message);
 }
 
 void
-- 
1.7.3.5




More information about the lldb-commits mailing list