[Lldb-commits] [lldb] [lldb] Inline expression evaluator error visualization (PR #106470)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 27 02:00:35 PDT 2024


labath wrote:

> I'm actually surprised that lldb-dap sees the new diagnostics because I thought it would run the expression through a lower-level API like SBFrame::EvaluateExpression(). But I guess it just provides a "terminal" window that passes everything through HandleCommand. To support this better, I'm thinking about adding a setting to opt into the inline diagnostics that only `lldb` sets, so we don't get unexpected results like this.

It has both. lldb-dap does this weird heuristic console multiplexing, where it guesses whether something should be treated like an expression (I guess that's because other VSCode debuggers do that), which is executed through EvaluateExpression, or an lldb command, which is executed through HandleCommand. So it's not very likely that a user will be running a "command" to evaluate an expression, but I think it still illustrates my point that HandleCommand can be (and probably is) invoked in contexts where one cannot guarantee the alignment of the output.

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


More information about the lldb-commits mailing list