[Lldb-commits] [lldb] [lldb-dap] Adjusting how repl-mode auto determines commands vs variable expressions. (PR #78005)

Walter Erquinigo via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 15 14:50:33 PST 2024


================
@@ -395,43 +402,56 @@ ExpressionContext DAP::DetectExpressionContext(lldb::SBFrame &frame,
   case ReplMode::Command:
     return ExpressionContext::Command;
   case ReplMode::Auto:
-    // If the frame is invalid then there is no variables to complete, assume
-    // this is an lldb command instead.
-    if (!frame.IsValid()) {
-      return ExpressionContext::Command;
-    }
-
+    // To determine if the expression is a command or not, check if the first
+    // term is a variable or command. If its a variable in scope we will prefer
----------------
walter-erquinigo wrote:

```suggestion
    // term is a variable or command. If it's a variable in scope we will prefer
```

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


More information about the lldb-commits mailing list