================ @@ -181,7 +181,17 @@ void EvaluateRequestHandler::operator()( expression = dap.last_nonempty_var_expression; else dap.last_nonempty_var_expression = expression; + } else { + // If this isn't a REPL context, trim leading pointer/reference characters + // to ensure we return the actual value of the expression. ---------------- ashgti wrote:
I agree that we shouldn't run evaluate expressions like `i++` in a watch context. I can fix that as well in this change as well. We're trying the expression with `frame.EvaluateExpression` if its not 'hover' but that should really be only used if 'context' == 'repl'. I also updated this to only trim leading `&*` for 'hover' specifically since watching `*x` should be supported. https://github.com/llvm/llvm-project/pull/146773 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits