[Lldb-commits] [lldb] Reapply "Fix error in unrecognized register name handling for "SBFram…e.register"" (#88468)" (PR #88535)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 12 10:51:02 PDT 2024
================
@@ -91,7 +93,17 @@ def test_get_arg_vals_for_call_stack(self):
frame.GetSP(),
"SP gotten as a value should equal frame's GetSP",
)
-
+ # Test that the "register" property's flat list matches the list from
+ # the "registers" property that returns register sets:
+ register_regs = set()
+ flattened_regs = set()
+ for reg_set in frame.registers:
+ for reg in reg_set:
+ flattened_regs.add(reg.name)
+ for reg in frame.register:
+ register_regs.add(reg.name)
----------------
jimingham wrote:
This PR is about fixing `register` not `registers`. If you try to iterate over it in the current sources you get a weird error. When I fixed just that error, then iterating over it spun forever, so I either had to explicitly turn off iterability or make some reasonable generator, which is what this patch does.
Adding `register_sets` as another property that does the same thing as `registers` seems fine, but also not really a part of this PR.
https://github.com/llvm/llvm-project/pull/88535
More information about the lldb-commits
mailing list