[Lldb-commits] [lldb] [LLDB] Add assignment to DIL. (PR #190223)

via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 2 10:50:58 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {darker}-->


:warning: Python code formatter, darker found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
darker --check --diff -r origin/main...HEAD lldb/test/API/commands/frame/var-dil/expr/Assignment/TestFrameVarDILAddAssign.py lldb/test/API/commands/frame/var-dil/expr/Assignment/TestFrameVarDILAssign.py lldb/test/API/commands/frame/var-dil/expr/Assignment/TestFrameVarDILSubAssign.py
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from darker here.
</summary>

``````````diff
--- TestFrameVarDILAssign.py	2026-04-02 17:44:51.000000 +0000
+++ TestFrameVarDILAssign.py	2026-04-02 17:50:28.410280 +0000
@@ -3,11 +3,12 @@
 """
 
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
-#from lldbsuite.test import lldbutil
+
+# from lldbsuite.test import lldbutil
 from lldbsuite.test import *
 
 
 class TestFrameVarDILAssignment(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
@@ -20,16 +21,16 @@
 
         self.runCmd("settings set target.experimental.use-DIL true")
 
         Is32Bit = False
         if self.target().GetAddressByteSize() == 4:
-          Is32Bit = True
+            Is32Bit = True
 
         self.expect(
             "frame variable '1 = 1'",
             error=True,
-            substrs=["current value is not assignable (a constant)"]
+            substrs=["current value is not assignable (a constant)"],
         )
 
         # Assigning to an int var
         self.expect_var_path("i", value="1")
         self.expect("frame variable 'i = 5'", substrs=["i = 5"])
@@ -56,55 +57,57 @@
         self.expect("frame variable 'f = 2.5f'", substrs=["f = 2.5"])
         self.expect_var_path("f", value="2.5")
         self.expect("frame variable 'f = 3.5f'", substrs=["f = 3.5"])
         self.expect_var_path("f", value="3.5")
 
-
         # Assigning to an enum
         self.expect(
             "frame variable 'i = eOne'",
             error=True,
-            substrs=["illegal argument: new value should be of the same size"]
+            substrs=["illegal argument: new value should be of the same size"],
         )
 
         self.expect("frame variable 'eOne = 1'", substrs=["eOne = TWO"])
 
         # Assigning to a pointer
         self.expect(
             "frame variable 'p = 1'",
             error=True,
-            substrs=["illegal argument: new value should be of the same size"]
+            substrs=["illegal argument: new value should be of the same size"],
         )
 
         if Is32Bit:
-          self.expect("frame variable 'p = (int*)12'", substrs=["p = 0x0000000c"])
-          self.expect_var_path("p", value="0x0000000c")
-          self.expect("frame variable 'p = 0'", substrs=["p = 0x00000000"])
+            self.expect("frame variable 'p = (int*)12'", substrs=["p = 0x0000000c"])
+            self.expect_var_path("p", value="0x0000000c")
+            self.expect("frame variable 'p = 0'", substrs=["p = 0x00000000"])
         else:
-          self.expect("frame variable 'p = (int*)12'", substrs=["p = 0x000000000000000c"])
-          self.expect_var_path("p", value="0x000000000000000c")
-          self.expect("frame variable 'p = (int *)0'", substrs=["p = 0x0000000000000000"])
+            self.expect(
+                "frame variable 'p = (int*)12'", substrs=["p = 0x000000000000000c"]
+            )
+            self.expect_var_path("p", value="0x000000000000000c")
+            self.expect(
+                "frame variable 'p = (int *)0'", substrs=["p = 0x0000000000000000"]
+            )
 
         self.expect(
             "frame variable 'p = farr'",
             error=True,
-            substrs=["illegal argument: new value should be of the same size"]
+            substrs=["illegal argument: new value should be of the same size"],
         )
 
         # Assigning to a bool
-        self.expect_var_path("b", value = "false")
+        self.expect_var_path("b", value="false")
         self.expect("frame variable 'b = true'", substrs=["b = true"])
-        self.expect_var_path("b", value = "true")
-        self.expect_var_path("(int)b", value = "")
+        self.expect_var_path("b", value="true")
+        self.expect_var_path("(int)b", value="")
         self.expect("frame variable 'b = (bool)0'", substrs=["b = false"])
-        self.expect_var_path("b", value = "false")
-
+        self.expect_var_path("b", value="false")
 
         # Assigning to an array
         self.expect("frame variable 'farr'", substrs=["([0] = 1, [1] = 2)"])
         self.expect("frame variable 'farr[1] = f'", substrs=["farr[1] = f = 3.5"])
-        self.expect_var_path("farr[1]", value = "3.5")
-        self.expect("frame variable 'farr'", substrs = ["([0] = 1, [1] = 3.5)"])
-        self.expect("frame variable 'arr'", substrs = ["([0] = 1, [1] = 2)"])
+        self.expect_var_path("farr[1]", value="3.5")
+        self.expect("frame variable 'farr'", substrs=["([0] = 1, [1] = 3.5)"])
+        self.expect("frame variable 'arr'", substrs=["([0] = 1, [1] = 2)"])
         self.expect("frame variable 'arr[0] = 37'", substrs=["arr[0] = 37"])
         self.expect("frame variable 'arr[1] = j'", substrs=["arr[1] = j = -4"])
-        self.expect("frame variable 'arr'", substrs = ["([0] = 37, [1] = -4)"])
+        self.expect("frame variable 'arr'", substrs=["([0] = 37, [1] = -4)"])

``````````

</details>


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


More information about the lldb-commits mailing list