[Lldb-commits] [lldb] r124521 - /lldb/trunk/source/Target/Process.cpp

Jim Ingham jingham at apple.com
Fri Jan 28 17:57:32 PST 2011


Author: jingham
Date: Fri Jan 28 19:57:31 2011
New Revision: 124521

URL: http://llvm.org/viewvc/llvm-project?rev=124521&view=rev
Log:
Handle the case where the "NextEventAction" wants to kill us on some event other than eStateExited.

Modified:
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=124521&r1=124520&r2=124521&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Fri Jan 28 19:57:31 2011
@@ -2153,8 +2153,17 @@
             case NextEventAction::eEventActionRetry:
                 break;
             case NextEventAction::eEventActionExit:
-                // Handle Exiting Here...
-                
+                // Handle Exiting Here.  If we already got an exited event,
+                // we should just propagate it.  Otherwise, swallow this event,
+                // and set our state to exit so the next event will kill us.
+                if (new_state != eStateExited)
+                {
+                    // FIXME: should cons up an exited event, and discard this one.
+                    SetExitStatus(0, m_next_event_action->GetExitString());
+                    SetNextEventAction(NULL);
+                    return;
+                }
+                SetNextEventAction(NULL);
                 break;
         }
     }





More information about the lldb-commits mailing list