Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error in unrecognized register name handling for "SBFrame.registe…
…r" (#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.
- Loading branch information