[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 01:56:32 PDT 2024


https://github.com/labath approved this pull request.

The setting might be useful as well, though I think it would be even better if this was settable on a per-invocation basis (an argument to HandleCommand or something) -- the reason being that someone might still want to have this feature for commands which are input through the console (or from contexts where you can guarantee their placement), but not for commands which are executed e.g. from scripts. Here's one example:
```
(lldb) script lldb.debugger.HandleCommand('expression -- ""+2.5')
error: <user expression 0>:1:3: invalid operands to binary expression ('const char[1]' and 'double')
    1 | ""+2.5
      | ~~^~~~
```
You definitely won't point to the right place there. It's convoluted, I know, but it's not that unsimilar from I do when debugging lldb, where I sometimes run things like `self.dbg.HandleCommand` from the pdb prompt.

However this is workaroundable by changing the setting, so I don't want to hold this up further.

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


More information about the lldb-commits mailing list