[Lldb-commits] [lldb] r270359 - Revert r270358 ("Fix an incorrectly used locking in HistoryThread and HistoryUnwind").

Kuba Brecka via lldb-commits lldb-commits at lists.llvm.org
Sun May 22 07:05:29 PDT 2016


Author: kuba.brecka
Date: Sun May 22 09:05:28 2016
New Revision: 270359

URL: http://llvm.org/viewvc/llvm-project?rev=270359&view=rev
Log:
Revert r270358 ("Fix an incorrectly used locking in HistoryThread and HistoryUnwind").


Modified:
    lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
    lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=270359&r1=270358&r2=270359&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Sun May 22 09:05:28 2016
@@ -75,7 +75,8 @@ lldb::StackFrameListSP
 HistoryThread::GetStackFrameList ()
 {
     // FIXME do not throw away the lock after we acquire it..
-    std::lock_guard<std::mutex> lock(m_framelist_mutex);
+    std::unique_lock<std::mutex> lock(m_framelist_mutex);
+    lock.release();
     if (m_framelist.get() == NULL)
     {
         m_framelist.reset (new StackFrameList (*this, StackFrameListSP(), true));

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=270359&r1=270358&r2=270359&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Sun May 22 09:05:28 2016
@@ -65,7 +65,8 @@ bool
 HistoryUnwind::DoGetFrameInfoAtIndex (uint32_t frame_idx, lldb::addr_t& cfa, lldb::addr_t& pc)
 {
     // FIXME do not throw away the lock after we acquire it..
-    std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
+    std::unique_lock<std::recursive_mutex> guard(m_unwind_mutex);
+    guard.release();
     if (frame_idx < m_pcs.size())
     {
         cfa = frame_idx;




More information about the lldb-commits mailing list