[Lldb-commits] [lldb] r131869 - in /lldb/trunk: include/lldb/Target/Process.h source/Target/Process.cpp

Jim Ingham jingham at apple.com
Sun May 22 14:45:01 PDT 2011


Author: jingham
Date: Sun May 22 16:45:01 2011
New Revision: 131869

URL: http://llvm.org/viewvc/llvm-project?rev=131869&view=rev
Log:
Change the m_update_state to an int, and only trigger the "on removal"
action the second time the event is removed (the first is the internal -> 
external transition, the second when it is pulled off the public event
queue, and further times when it is put back because we are faking a
stop reason to hide the expression evaluation stops.

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

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=131869&r1=131868&r2=131869&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Sun May 22 16:45:01 2011
@@ -1033,7 +1033,7 @@
             void
             SetUpdateStateOnRemoval()
             {
-                m_update_state = true;
+                m_update_state++;
             }
             void
             SetRestarted (bool new_value)
@@ -1049,7 +1049,7 @@
             lldb::ProcessSP m_process_sp;
             lldb::StateType m_state;
             bool m_restarted;  // For "eStateStopped" events, this is true if the target was automatically restarted.
-            bool m_update_state;
+            int m_update_state;
             bool m_interrupted;
             DISALLOW_COPY_AND_ASSIGN (ProcessEventData);
 

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=131869&r1=131868&r2=131869&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Sun May 22 16:45:01 2011
@@ -2812,7 +2812,7 @@
     m_process_sp (),
     m_state (eStateInvalid),
     m_restarted (false),
-    m_update_state (false),
+    m_update_state (0),
     m_interrupted (false)
 {
 }
@@ -2822,7 +2822,7 @@
     m_process_sp (process_sp),
     m_state (state),
     m_restarted (false),
-    m_update_state (false),
+    m_update_state (0),
     m_interrupted (false)
 {
 }
@@ -2848,12 +2848,13 @@
 Process::ProcessEventData::DoOnRemoval (Event *event_ptr)
 {
     // This function gets called twice for each event, once when the event gets pulled 
-    // off of the private process event queue, and once when it gets pulled off of
-    // the public event queue.  m_update_state is used to distinguish these
-    // two cases; it is false when we're just pulling it off for private handling, 
-    // and we don't want to do the breakpoint command handling then.
+    // off of the private process event queue, and then any number of times, first when it gets pulled off of
+    // the public event queue, then other times when we're pretending that this is where we stopped at the
+    // end of expression evaluation.  m_update_state is used to distinguish these
+    // three cases; it is 0 when we're just pulling it off for private handling, 
+    // and > 1 for expression evaluation, and we don't want to do the breakpoint command handling then.
     
-    if (!m_update_state)
+    if (m_update_state != 1)
         return;
         
     m_process_sp->SetPublicState (m_state);





More information about the lldb-commits mailing list