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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to