Skip to content

[lldb] Print ValueObject when GetObjectDescription fails#152417

Merged
kastiglione merged 7 commits into
llvm:mainfrom
kastiglione:lldb-Propagate-ExpressionErrors-from-ValueObjectPrinter-GetDescriptionForDisplay
Aug 15, 2025
Merged

[lldb] Print ValueObject when GetObjectDescription fails#152417
kastiglione merged 7 commits into
llvm:mainfrom
kastiglione:lldb-Propagate-ExpressionErrors-from-ValueObjectPrinter-GetDescriptionForDisplay

Conversation

@kastiglione

@kastiglione kastiglione commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

This fixes a few bugs, effectively through a fallback to p when po fails.

The motivating bug this fixes is when an error within the compiler causes po to fail. Previously when that happened, only its value (typically an object's address) was printed – and problematically, no compiler diagnostics were shown. With this change, compiler diagnostics are shown, and the object is fully printed (ie p).

Another bug this fixes is when po is used on a type that doesn't provide an object description (such as a struct). Again, the normal ValueObject printing is used.

Additionally, this also improves how lldb handles an object description method that fails in some way. Now an error will be shown (it wasn't before), and the value will be printed normally.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants