[Lldb-commits] [PATCH] D143282: [lldb] Accept negative indexes in __getitem__
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 3 09:40:33 PST 2023
kastiglione created this revision.
kastiglione added reviewers: JDevlieghere, mib, bulbazord.
Herald added a subscriber: arphaman.
Herald added a project: All.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
To the Python bindings, add support for Python-like indexing with negative indexes.
While was using `script`, I tried to access a thread's bottom frame with `thread.frame[-1]`, but that failed. This change updates the `__getitem__` implementations to support negative indexes as one would expect in Python.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D143282
Files:
lldb/bindings/interface/SBBreakpoint.i
lldb/bindings/interface/SBInstructionList.i
lldb/bindings/interface/SBModule.i
lldb/bindings/interface/SBProcess.i
lldb/bindings/interface/SBSymbolContextList.i
lldb/bindings/interface/SBTarget.i
lldb/bindings/interface/SBThread.i
lldb/bindings/interface/SBTypeCategory.i
lldb/bindings/interface/SBTypeEnumMember.i
lldb/bindings/interface/SBValue.i
lldb/bindings/interface/SBValueList.i
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143282.494673.patch
Type: text/x-patch
Size: 8384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230203/9ab30ecd/attachment-0001.bin>
More information about the lldb-commits
mailing list