================
@@ -128,30 +130,41 @@ bool StackFrameList::DecrementCurrentInlinedDepth() {
 }
 
 void StackFrameList::SetCurrentInlinedDepth(uint32_t new_depth) {
+  std::lock_guard<std::mutex> guard(m_inlined_depth_mutex);
   m_current_inlined_depth = new_depth;
   if (new_depth == UINT32_MAX)
     m_current_inlined_pc = LLDB_INVALID_ADDRESS;
   else
     m_current_inlined_pc = m_thread.GetRegisterContext()->GetPC();
 }
 
-void StackFrameList::GetOnlyConcreteFramesUpTo(uint32_t end_idx,
-                                               Unwind &unwinder) {
+void StackFrameList::GetOnlyConcreteFramesUpTo(
+    uint32_t end_idx, Unwind &unwinder,
+    std::shared_lock<std::shared_mutex> &guard) {
----------------
labath wrote:

All of the work of this function is done under the exclusive mutex. Why does it 
need the lock dance?

https://github.com/llvm/llvm-project/pull/117252
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to