[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 13 05:49:30 PST 2024


================
@@ -101,9 +101,9 @@ def run_test_evaluate_expressions(
         if context == "repl":
             # In the repl context expressions may be interpreted as lldb
             # commands since no variables have the same name as the command.
-            self.assertEvaluate("var", r"\(lldb\) var\n.*")
+            self.assertEvaluate("list", r"\(lldb\) list\n.*")
         else:
-            self.assertEvaluateFailure("var")  # local variable of a_function
+            self.assertEvaluateFailure("list")  # local variable of a_function
----------------
ashgti wrote:

In the Debug Adapter Protocol `evaluate` request (https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Evaluate) the `context` changes whether we're looking for variables in the current frame or lldb commands. If the context is `repl` then we'll try to evaluate expressions as lldb commands, otherwise if the context is `hover`/`watch`/`variables` then we only look for variables in the current scope.

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


More information about the lldb-commits mailing list