[Lldb-commits] [lldb] r185010 - Remove unneeded limbo state flag.

Matt Kopec Matt.Kopec at intel.com
Wed Jun 26 11:46:08 PDT 2013


Author: mkopec
Date: Wed Jun 26 13:46:08 2013
New Revision: 185010

URL: http://llvm.org/viewvc/llvm-project?rev=185010&view=rev
Log:
Remove unneeded limbo state flag.

Modified:
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
    lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h

Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp?rev=185010&r1=185009&r2=185010&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.cpp Wed Jun 26 13:46:08 2013
@@ -76,7 +76,6 @@ ProcessPOSIX::ProcessPOSIX(Target& targe
       m_monitor(NULL),
       m_module(NULL),
       m_message_mutex (Mutex::eMutexTypeRecursive),
-      m_in_limbo(false),
       m_exit_now(false)
 {
     // FIXME: Putting this code in the ctor and saving the byte order in a
@@ -257,18 +256,9 @@ ProcessPOSIX::DoResume()
 {
     StateType state = GetPrivateState();
 
-    assert(state == eStateStopped || state == eStateCrashed);
+    assert(state == eStateStopped);
 
-    // We are about to resume a thread that will cause the process to exit so
-    // set our exit status now.  Do not change our state if the inferior
-    // crashed.
-    if (state == eStateStopped) 
-    {
-        if (m_in_limbo)
-            SetExitStatus(m_exit_status, NULL);
-        else
-            SetPrivateState(eStateRunning);
-    }
+    SetPrivateState(eStateRunning);
 
     bool did_resume = false;
     uint32_t thread_count = m_thread_list.GetSize(false);
@@ -395,7 +385,6 @@ ProcessPOSIX::SendMessage(const ProcessM
         thread->SetState(eStateStopped);
         if (message.GetTID() == GetID())
         {
-            m_in_limbo = true;
             m_exit_status = message.GetExitStatus();
             if (m_exit_now)
             {

Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h?rev=185010&r1=185009&r2=185010&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIX.h Wed Jun 26 13:46:08 2013
@@ -171,13 +171,6 @@ protected:
     lldb_private::Mutex m_message_mutex;
     std::queue<ProcessMessage> m_message_queue;
 
-    /// True when the process has entered a state of "limbo".
-    ///
-    /// This flag qualifies eStateStopped.  It lets us know that when we
-    /// continue from this state the process will exit.  Also, when true,
-    /// Process::m_exit_status is set.
-    bool m_in_limbo;
-
     /// Drive any exit events to completion.
     bool m_exit_now;
 





More information about the lldb-commits mailing list