[Lldb-commits] [lldb] [lldb-dap] Improving 'variables' hover requests. (PR #146773)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 3 17:24:06 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.
----------------
jimingham wrote:

Since people have to voluntarily put something in a watch panel, then in that case we should even run it as an expression.  If somebody actually puts `i++` in a watch window, presumably they meant for it to increment every time they stepped.
We had a silly bug in gdbtk way back in the day where we if you moused over a selection we would run the selection  as an expression.  But lots of people seem to select expressions so that they can focus on just the part they selected.  As you can imagine, that went poorly.
The main thing - for me - is not to always have running expressions be a distinct gesture.

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


More information about the lldb-commits mailing list