================
@@ -734,9 +740,13 @@ def update(self):
             # variable tells which element in this NxM array is the 0th
             # one, and the 'size' element gives the number of elements
             # in the deque.
-            count = self._get_value_of_compressed_pair(
-                self.valobj.GetChildMemberWithName("__size_")
-            )
+            if has_compressed_pair_layout:
+                count = self._get_value_of_compressed_pair(
+                    self.valobj.GetChildMemberWithName("__size_")
+                )
+            else:
+                count = size_valobj.GetValueAsUnsigned(0)
----------------
Michael137 wrote:

Yea I remember looking into an issue like that for some other formatter. Though 
this patch doesn't change behaviour in this case. If we had garbage in 
`__size_`, we previously would've also read its value and treated it as the 
`count`. The only difference here is that we don't unwrap the `compressed_pair` 
anymore.

I'll open a follow-up issue for fixing this in a separate PR. In fact, the 
other issue might still be open somewhere. I'll have a look

https://github.com/llvm/llvm-project/pull/96538
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to