[Lldb-commits] [lldb] [lldb] Fix variable access in old SBFrames after inferior function calls (PR #178823)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 30 16:46:08 PST 2026
================
@@ -1410,8 +1416,22 @@ class Thread : public std::enable_shared_from_this<Thread>,
/// The Thread backed by this thread, if any.
lldb::ThreadWP m_backed_thread;
- /// The Scripted Frame Providers for this thread.
- llvm::SmallVector<lldb::SyntheticFrameProviderSP, 0> m_frame_providers;
+ /// Map from frame list ID to its frame provider.
+ /// Cleared in ClearStackFrames(), repopulated in GetStackFrameList().
+ llvm::SmallDenseMap<uint64_t, lldb::SyntheticFrameProviderSP, 4>
+ m_frame_providers;
+
+ /// Ordered chain of provider IDs.
+ /// Persists across ClearStackFrames() to maintain stable provider IDs.
+ llvm::SmallVector<std::pair<ScriptedFrameProviderDescriptor, uint64_t>, 0>
----------------
adrian-prantl wrote:
SmallVectors make most sense in a leaf function, in a long-lived object like this, I would probably just use a std::vector? Especially since the inline size is 0.
https://github.com/llvm/llvm-project/pull/178823
More information about the lldb-commits
mailing list