[Lldb-commits] [lldb] [lldb-dap] Updating VariableDescription to use GetDescription() as a fallback. (PR #77026)

Walter Erquinigo via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 9 09:18:57 PST 2024


================
@@ -242,19 +254,57 @@ def do_test_scopes_variables_setVariable_evaluate(
             },
             "pt": {
                 "equals": {"type": "PointType"},
-                "startswith": {
-                    "result": "{x:11, y:22}"
+                "equals": {
+                    "result": "{x:11, y:22, buffer:{...}}"
                     if enableAutoVariableSummaries
-                    else "PointType @ 0x"
+                    else """(PointType) pt = {
+  x = 11
+  y = 22
+  buffer = {
+    [0] = 0
+    [1] = 1
+    [2] = 2
+    [3] = 3
+    [4] = 4
+    [5] = 5
+    [6] = 6
+    [7] = 7
+    [8] = 8
+    [9] = 9
+    [10] = 10
+    [11] = 11
+    [12] = 12
+    [13] = 13
+    [14] = 14
+    [15] = 15
+  }
+}"""
                 },
                 "hasVariablesReference": True,
             },
             "pt.buffer": {
                 "equals": {"type": "int[32]"},
-                "startswith": {
+                "equals": {
                     "result": "{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...}"
                     if enableAutoVariableSummaries
-                    else "int[32] @ 0x"
----------------
walter-erquinigo wrote:

out of curiosity, how is this rendered in the variables tab on VSCode? Something I tried to achieve with auto summaries is to use a single line for readability, so I'd like to know how this looks like in the UI

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


More information about the lldb-commits mailing list