[Lldb-commits] [lldb] [lldb-dap] Improving 'variables' hover requests. (PR #146773)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 7 09:24:22 PDT 2025
================
@@ -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
More information about the lldb-commits
mailing list