diff options
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 11 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 4dba00bb43f..77981efc446 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -163,7 +163,6 @@ ProcessGDBRemote::ProcessGDBRemote(Target& target, Listener &listener) : m_async_broadcaster (NULL, "lldb.process.gdb-remote.async-broadcaster"), m_async_thread (LLDB_INVALID_HOST_THREAD), m_thread_ids (), - m_thread_ids_mutex (Mutex::eMutexTypeRecursive), m_continue_c_tids (), m_continue_C_tids (), m_continue_s_tids (), @@ -1157,14 +1156,14 @@ ProcessGDBRemote::DoResume () void ProcessGDBRemote::ClearThreadIDList () { - Mutex::Locker locker(m_thread_ids_mutex); + Mutex::Locker locker(m_thread_list.GetMutex()); m_thread_ids.clear(); } bool ProcessGDBRemote::UpdateThreadIDList () { - Mutex::Locker locker(m_thread_ids_mutex); + Mutex::Locker locker(m_thread_list.GetMutex()); bool sequence_mutex_unavailable = false; m_gdb_comm.GetCurrentThreadIDs (m_thread_ids, sequence_mutex_unavailable); if (sequence_mutex_unavailable) @@ -1184,8 +1183,6 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD)); if (log && log->GetMask().Test(GDBR_LOG_VERBOSE)) log->Printf ("ProcessGDBRemote::%s (pid = %llu)", __FUNCTION__, GetID()); - // Update the thread list's stop id immediately so we don't recurse into this function. - Mutex::Locker locker(m_thread_ids_mutex); size_t num_thread_ids = m_thread_ids.size(); // The "m_thread_ids" thread ID list should always be updated after each stop @@ -1283,7 +1280,7 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) } else if (name.compare("threads") == 0) { - Mutex::Locker locker(m_thread_ids_mutex); + Mutex::Locker locker(m_thread_list.GetMutex()); m_thread_ids.clear(); // A comma separated list of all threads in the current // process that includes the thread for this stop reply @@ -1494,7 +1491,7 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) void ProcessGDBRemote::RefreshStateAfterStop () { - Mutex::Locker locker(m_thread_ids_mutex); + Mutex::Locker locker(m_thread_list.GetMutex()); m_thread_ids.clear(); // Set the thread stop info. It might have a "threads" key whose value is // a list of all thread IDs in the current process, so m_thread_ids might diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index f0cd5aab18b..1c9e845e35b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -309,7 +309,6 @@ protected: typedef std::vector< std::pair<lldb::tid_t,int> > tid_sig_collection; typedef std::map<lldb::addr_t, lldb::addr_t> MMapMap; tid_collection m_thread_ids; // Thread IDs for all threads. This list gets updated after stopping - lldb_private::Mutex m_thread_ids_mutex; tid_collection m_continue_c_tids; // 'c' for continue tid_sig_collection m_continue_C_tids; // 'C' for continue with signal tid_collection m_continue_s_tids; // 's' for step |

