================ @@ -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) { ---------------- jimingham wrote:
I don't understand this comment. In the patch as posted, GetOnly ConcreteFramesUpTo gets called before the shared lock is dropped and the exclusive mutex acquired (since it returned right away in its only use, it seemed nicer to put that dance in the function. That should be clear by moving the equivalent "get concrete and inlined frames" code into its own function. 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