[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:35:41 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:

Iterating over what twice?  One is iterating over the elements of the list that is the `registers` property, and the other using the generator for the `register` (note no final `s`) property.

`registers` is actually a poorly named property since it actually produces a list of `register sets`.

https://github.com/llvm/llvm-project/pull/88535


More information about the lldb-commits mailing list