forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 346
[lldb] Print ValueObject when GetObjectDescription fails (#152417) #11178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kastiglione
wants to merge
2
commits into
stable/21.x
Choose a base branch
from
dl/lldb-Print-ValueObject-when-GetObjectDescription-fails-152417
base: stable/21.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[lldb] Print ValueObject when GetObjectDescription fails (#152417) #11178
kastiglione
wants to merge
2
commits into
stable/21.x
from
dl/lldb-Print-ValueObject-when-GetObjectDescription-fails-152417
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@swift-ci test |
e6ff6e7
to
a9df4d9
Compare
@swift-ci test |
a9df4d9
to
52281c1
Compare
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. (cherry picked from commit ae7e1b8)
52281c1
to
12405a2
Compare
rebased to stable/21.x |
@swift-ci test |
1 similar comment
@swift-ci test |
@swift-ci test macOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a few bugs, effectively through a fallback to
p
whenpo
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 objectdescription (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.
(cherry picked from commit ae7e1b8)
rdar://134291640
rdar://134520818