This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add deref support to libc++ unique_ptr synthetic
ClosedPublic

Authored by kastiglione on Feb 25 2021, 8:10 PM.

Details

Summary

Add frame variable dereference suppport to libc++ std::unique_ptr.

This change allows for commands like v *thing_up and v thing_up->m_id. These commands now work the same way they would with raw pointers, and as they would with expression. This is done by adding an unaccounted for child member named $$dereference$$.

Without this change, the command would have to be written as v *thing_up.__value_ or v thing_up.__value_->m_id which exposes internal structure and is more clumsy to type.

Additionally, the existing tests were updated. See also D97165 which added deref support for std::shared_ptr.

Diff Detail

Event Timeline

kastiglione requested review of this revision.Feb 25 2021, 8:10 PM
kastiglione created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2021, 8:10 PM
kastiglione edited the summary of this revision. (Show Details)Feb 25 2021, 8:10 PM

There's pretty much nothing new here compared D97165.

This revision is now accepted and ready to land.Feb 25 2021, 8:19 PM
kastiglione edited the summary of this revision. (Show Details)Feb 25 2021, 9:45 PM
This revision was landed with ongoing or failed builds.Feb 26 2021, 7:39 AM
This revision was automatically updated to reflect the committed changes.