================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to