summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-05-07 15:01:34 +0000
committerAshok Thirumurthi <ashok.thirumurthi@intel.com>2013-05-07 15:01:34 +0000
commitf5b92402bf1f9641aeaa5d1dc80fd3e88ff23116 (patch)
tree9024f5f03a2374b3f0881cd511839d65fe33256d /lldb/source/Target/Process.cpp
parent954c6ef10f446f89236680962feac21fa48b189f (diff)
downloadbcm5719-llvm-f5b92402bf1f9641aeaa5d1dc80fd3e88ff23116.tar.gz
bcm5719-llvm-f5b92402bf1f9641aeaa5d1dc80fd3e88ff23116.zip
Temporarily reverting r181091 and r181106 due to the vast test breakage on the Linux buildbots
while we develop a better understanding of how to manage the thread lists in a platform-independant fashion. Reviewed by: Daniel Malea llvm-svn: 181323
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index fda71060d47..227d4c1296c 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1016,8 +1016,6 @@ Process::Process(Target &target, Listener &listener) :
m_thread_id_to_index_id_map (),
m_exit_status (-1),
m_exit_string (),
- m_thread_mutex (Mutex::eMutexTypeRecursive),
- m_thread_list_real (this),
m_thread_list (this),
m_notifications (),
m_image_tokens (),
@@ -1142,7 +1140,6 @@ Process::Finalize()
m_abi_sp.reset();
m_os_ap.reset();
m_dyld_ap.reset();
- m_thread_list_real.Destroy();
m_thread_list.Destroy();
std::vector<Notifications> empty_notifications;
m_notifications.swap(empty_notifications);
@@ -1540,12 +1537,10 @@ Process::UpdateThreadListIfNeeded ()
// m_thread_list does have its own mutex, but we need to
// hold onto the mutex between the call to UpdateThreadList(...)
// and the os->UpdateThreadList(...) so it doesn't change on us
- ThreadList &old_thread_list = m_thread_list;
- ThreadList real_thread_list(this);
ThreadList new_thread_list(this);
// Always update the thread list with the protocol specific
// thread list, but only update if "true" is returned
- if (UpdateThreadList (m_thread_list_real, real_thread_list))
+ if (UpdateThreadList (m_thread_list, new_thread_list))
{
// Don't call into the OperatingSystem to update the thread list if we are shutting down, since
// that may call back into the SBAPI's, requiring the API lock which is already held by whoever is
@@ -1557,23 +1552,16 @@ Process::UpdateThreadListIfNeeded ()
{
// Clear any old backing threads where memory threads might have been
// backed by actual threads from the lldb_private::Process subclass
- size_t num_old_threads = old_thread_list.GetSize(false);
+ size_t num_old_threads = m_thread_list.GetSize(false);
for (size_t i=0; i<num_old_threads; ++i)
- old_thread_list.GetThreadAtIndex(i, false)->ClearBackingThread();
+ m_thread_list.GetThreadAtIndex(i, false)->ClearBackingThread();
// Now let the OperatingSystem plug-in update the thread list
- os->UpdateThreadList (old_thread_list, // Old list full of threads created by OS plug-in
- real_thread_list, // The actual thread list full of threads created by each lldb_private::Process subclass
- new_thread_list); // The new thread list that we will show to the user that gets filled in
- }
- else
- {
- // No OS plug-in, the new thread list is the same as the real thread list
- new_thread_list = real_thread_list;
+ os->UpdateThreadList (m_thread_list, new_thread_list);
}
+ m_thread_list.Update (new_thread_list);
+ m_thread_list.SetStopID (stop_id);
}
- m_thread_list.Update (new_thread_list);
- m_thread_list.SetStopID (stop_id);
}
}
}
OpenPOWER on IntegriCloud