[Lldb-commits] [lldb] r195177 - Flush the Process' cache of extended threads every time the

Jason Molenda jmolenda at apple.com
Tue Nov 19 16:31:38 PST 2013


Author: jmolenda
Date: Tue Nov 19 18:31:38 2013
New Revision: 195177

URL: http://llvm.org/viewvc/llvm-project?rev=195177&view=rev
Log:
Flush the Process' cache of extended threads every time the
natural stop id is updated.
<rdar://problem/15496603> 

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=195177&r1=195176&r2=195177&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Tue Nov 19 18:31:38 2013
@@ -3683,7 +3683,8 @@ protected:
     ThreadList                  m_thread_list_real;     ///< The threads for this process as are known to the protocol we are debugging with
     ThreadList                  m_thread_list;          ///< The threads for this process as the user will see them. This is usually the same as
                                                         ///< m_thread_list_real, but might be different if there is an OS plug-in creating memory threads
-    ThreadList                  m_extended_thread_list; ///< Owner for extended threads that may be generated, cleared on public stops
+    ThreadList                  m_extended_thread_list; ///< Owner for extended threads that may be generated, cleared on natural stops
+    uint32_t                    m_extended_thread_stop_id; ///< The natural stop id when extended_thread_list was last updated
     std::vector<Notifications>  m_notifications;        ///< The list of notifications that this process can deliver.
     std::vector<lldb::addr_t>   m_image_tokens;
     Listener                    &m_listener;

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=195177&r1=195176&r2=195177&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Nov 19 18:31:38 2013
@@ -1024,6 +1024,7 @@ Process::Process(Target &target, Listene
     m_thread_list_real (this),
     m_thread_list (this),
     m_extended_thread_list (this),
+    m_extended_thread_stop_id (0),
     m_notifications (),
     m_image_tokens (),
     m_listener (listener),
@@ -1594,8 +1595,12 @@ Process::UpdateThreadListIfNeeded ()
                 m_thread_list.Update (new_thread_list);
                 m_thread_list.SetStopID (stop_id);
 
-                // Clear any extended threads that we may have accumulated previously
-                m_extended_thread_list.Clear();
+                if (GetLastNaturalStopID () != m_extended_thread_stop_id)
+                {
+                    // Clear any extended threads that we may have accumulated previously
+                    m_extended_thread_list.Clear();
+                    m_extended_thread_stop_id = GetLastNaturalStopID ();
+                }
             }
         }
     }





More information about the lldb-commits mailing list