[all-commits] [llvm/llvm-project] 9a3607: Fix error in unrecognized register name handling f...
jimingham via All-commits
all-commits at lists.llvm.org
Thu Apr 11 15:25:01 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a36077e4db30c7da603620762036d4a430e4e62
https://github.com/llvm/llvm-project/commit/9a36077e4db30c7da603620762036d4a430e4e62
Author: jimingham <jingham at apple.com>
Date: 2024-04-11 (Thu, 11 Apr 2024)
Changed paths:
M lldb/bindings/interface/SBFrameExtensions.i
M lldb/test/API/python_api/frame/TestFrames.py
Log Message:
-----------
Fix error in unrecognized register name handling for "SBFrame.register" (#88047)
The code returned lldb.SBValue() when you passed in an unrecognized
register name. But referring to "lldb" is apparently not legal within
the module.
I changed this to just return SBValue(), but then this construct:
(lldb) script
>>> for reg_set in lldb.target.process.thread[0].frames[0].register
... print(reg)
Runs forever printing "No Value". The __getitem__(key) gets called with
a monotonically increasing by 1 series of integers. I don't know why
Python decided the class we defined should have a generator that returns
positive integers in order, but we can add a more useful one here by
returning an iterator over the flattened list of registers.
Note, the not very aptly named "SBFrame.registers" is an iterator over
register sets, not registers, so the two are not redundant.
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