================
@@ -1364,8 +1364,14 @@ void request_evaluate(const llvm::json::Object &request)
{
std::string expression = GetString(arguments, "expression").str();
llvm::StringRef context = GetString(arguments, "context");
- if (context == "repl" && g_dap.DetectExpressionContext(frame, expression) ==
- ExpressionContext::Command) {
+ if (context == "repl" &&
+ (expression.empty() ?
+ g_dap.last_nonempty_var_expression.empty() :
+ g_dap.DetectExpressionContext(frame, expression) ==
----------------
cmtice wrote:
I've done the best compromise I can -- I've created a new variable,
'repeat_last_command' to use in the if-condition, and tried to set up the
if-condition to avoid unnecessary calls to DetectExpressionContext.
https://github.com/llvm/llvm-project/pull/107485
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits