-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb] Delay removal of persistent results
Follow up to "Suppress persistent result when running po" (D144044). This change delays removal of the persistent result until after `Dump` has been called. In doing so, the persistent result is available for the purpose of getting its object description. In the original change, the persistent result removal happens indirectly, by setting `EvaluateExpressionOptions::SetSuppressPersistentResult`. In practice this has worked, however this exposed a latent bug in swift-lldb. The subtlety, and the bug, depend on when the persisteted result variable is removed. When the result is removed via `SetSuppressPersistentResult`, it happens within the call to `Target::EvaluateExpression`. That is, by the time the call returns, the persistent result is already removed. The issue occurs shortly thereafter, when `ValueObject::Dump` is called, it cannot make use of the persistent result variable (instead it uses the `ValueObjectConstResult`). In swift-lldb, this causes an additional expression evaluation to happen. It first tries an expression that reference `$R0` etc, but that always fails because `$R0` is removed. The fallback to this failure does work most of the time, but there's at least one bug involving imported Clang types. Differential Revision: https://reviews.llvm.org/D150619
- Loading branch information
1 parent
d02d054
commit db81455
Showing
3 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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