[Lldb-commits] [lldb] [lldb-dap] Add feature to remember last non-empty expression. (PR #107485)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 19 06:20:43 PDT 2024


================
@@ -54,13 +54,20 @@ def run_test_evaluate_expressions(
                 line_number(source, "// breakpoint 5"),
                 line_number(source, "// breakpoint 6"),
                 line_number(source, "// breakpoint 7"),
+                line_number(source, "// breakpoint 8"),
             ],
         )
         self.continue_to_next_stop()
 
         # Expressions at breakpoint 1, which is in main
         self.assertEvaluate("var1", "20")
+        # Empty expression should equate to the previous expression.
+        if context == "repl":
+            self.assertEvaluate("", "20")
----------------
labath wrote:

```suggestion
            self.assertEvaluate("", "20")
        else:
            self.assertEvaluateFailure("")
```
.. or something along those lines (I haven't checked whether this works) -- basically to check that the empty string does not repeat in non-repl contexts.

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


More information about the lldb-commits mailing list