[all-commits] [llvm/llvm-project] d584d0: [lldb] Introduce SBFrameList for lazy frame iterat...
Med Ismail Bennani via All-commits
all-commits at lists.llvm.org
Wed Nov 5 16:02:23 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d584d00ed250e547c9910e0a93b7f9d07f2e71c3
https://github.com/llvm/llvm-project/commit/d584d00ed250e547c9910e0a93b7f9d07f2e71c3
Author: Med Ismail Bennani <ismail at bennani.ma>
Date: 2025-11-05 (Wed, 05 Nov 2025)
Changed paths:
A lldb/bindings/interface/SBFrameListExtensions.i
M lldb/bindings/interface/SBThreadExtensions.i
M lldb/bindings/interfaces.swig
M lldb/include/lldb/API/LLDB.h
M lldb/include/lldb/API/SBDefines.h
M lldb/include/lldb/API/SBFrame.h
A lldb/include/lldb/API/SBFrameList.h
M lldb/include/lldb/API/SBStream.h
M lldb/include/lldb/API/SBThread.h
M lldb/include/lldb/Target/StackFrameList.h
M lldb/include/lldb/Target/Thread.h
M lldb/source/API/CMakeLists.txt
A lldb/source/API/SBFrameList.cpp
M lldb/source/API/SBThread.cpp
A lldb/test/API/python_api/frame_list/Makefile
A lldb/test/API/python_api/frame_list/TestSBFrameList.py
A lldb/test/API/python_api/frame_list/main.cpp
Log Message:
-----------
[lldb] Introduce SBFrameList for lazy frame iteration (#166651)
This patch introduces `SBFrameList`, a new SBAPI class that allows
iterating over stack frames lazily without calling
`SBThread::GetFrameAtIndex` in a loop.
The new `SBThread::GetFrames()` method returns an `SBFrameList` that
supports Python iteration (`for frame in frame_list:`), indexing
(`frame_list[0]`, `frame_list[-1]`), and length queries (`len()`).
The implementation uses `StackFrameListSP` as the opaque pointer,
sharing the thread's underlying frame list to ensure frames are
materialized on-demand.
This is particularly useful for ScriptedFrameProviders, where user
scripts will be to iterate, filter, and replace frames lazily without
materializing the entire stack upfront.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list