[Lldb-commits] [PATCH] D97524: [lldb] Add deref support to libc++ unique_ptr synthetic

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 25 20:10:05 PST 2021

kastiglione created this revision.
kastiglione added reviewers: teemperor, jingham, JDevlieghere.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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 https://reviews.llvm.org/D97165 which added deref support for `std::shared_ptr`.

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97524.326587.patch
Type: text/x-patch
Size: 7974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210226/4fa1ff07/attachment.bin>

More information about the lldb-commits mailing list