[all-commits] [llvm/llvm-project] 3ff636: [lldb] Accept negative indexes in __getitem__
Dave Lee via All-commits
all-commits at lists.llvm.org
Wed Feb 8 10:46:51 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3ff636729d067801039b3a37618f6ce0dd1c3d24
https://github.com/llvm/llvm-project/commit/3ff636729d067801039b3a37618f6ce0dd1c3d24
Author: Dave Lee <davelee.com at gmail.com>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M lldb/bindings/interface/SBBreakpoint.i
M lldb/bindings/interface/SBInstructionList.i
M lldb/bindings/interface/SBModule.i
M lldb/bindings/interface/SBProcess.i
M lldb/bindings/interface/SBSymbolContextList.i
M lldb/bindings/interface/SBTarget.i
M lldb/bindings/interface/SBThread.i
M lldb/bindings/interface/SBTypeCategory.i
M lldb/bindings/interface/SBTypeEnumMember.i
M lldb/bindings/interface/SBValue.i
M lldb/bindings/interface/SBValueList.i
M lldb/test/API/python_api/breakpoint/TestBreakpointAPI.py
M lldb/test/API/python_api/thread/TestThreadAPI.py
Log Message:
-----------
[lldb] Accept negative indexes in __getitem__
To the Python bindings, add support for Python-like 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.
Differential Revision: https://reviews.llvm.org/D143282
More information about the All-commits
mailing list