[Lldb-commits] [lldb] [lldb] Show value for libcxx and libstdcxx summary and remove pointer value in libcxx container summary (PR #125294)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 3 00:58:38 PST 2025


================
@@ -10,22 +10,37 @@
 
 
 class LibcxxVectorDataFormatterTestCase(TestBase):
-    def check_numbers(self, var_name):
-        self.expect(
-            "frame variable " + var_name,
-            substrs=[
-                var_name + " = size=7",
-                "[0] = 1",
-                "[1] = 12",
-                "[2] = 123",
-                "[3] = 1234",
-                "[4] = 12345",
-                "[5] = 123456",
-                "[6] = 1234567",
-                "}",
-            ],
-        )
-
+    def check_numbers(self, var_name, show_ptr=False):
+        if show_ptr:
+            self.expect(
+                "frame variable " + var_name,
+                patterns=[var_name + " = 0x.* size=7"],
----------------
labath wrote:

Insteand of repeating the whole expectation, I think it'd be better to just temp variable for the "expected summary string", and conditionalize just its value.

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


More information about the lldb-commits mailing list