Flush the Process' cache of extended threads every time the

natural stop id is updated.
<rdar://problem/15496603> 

llvm-svn: 195177
This commit is contained in:
Jason Molenda 2013-11-20 00:31:38 +00:00
parent 0ae51cb4ff
commit 4ff132610a
2 changed files with 9 additions and 3 deletions

View File

@ -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;

View File

@ -1024,6 +1024,7 @@ Process::Process(Target &target, Listener &listener) :
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 ();
}
}
}
}