llvm-project
755733e2 - [lldb/Target] Track containing StackFrameList to avoid circular dependencies (#170226)

Commit
38 days ago
[lldb/Target] Track containing StackFrameList to avoid circular dependencies (#170226) This change adds tracking of the StackFrameList that produced each frame by storing a weak pointer (m_frame_list_wp) in both `StackFrame` and `ExecutionContextRef`. When resolving frames through `ExecutionContextRef::GetFrameSP`, the code now first attempts to use the remembered frame list instead of immediately calling `Thread::GetStackFrameList`. This breaks circular dependencies that can occur during frame provider initialization, where creating a frame provider might trigger `ExecutionContext` resolution, which would then call back into `Thread::GetStackFrameList()`, creating an infinite loop. The `StackFrameList` now sets m_frame_list_wp on every frame it creates, and a new virtual method `GetOriginatingStackFrameList` allows frames to expose their originating list. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Author
Parents
Loading