[Lldb-commits] [PATCH] D97165: [lldb] Add deref support and tests to shared_ptr synthetic

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Feb 21 14:53:43 PST 2021


kastiglione created this revision.
kastiglione added reviewers: jingham, JDevlieghere, teemperor.
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::shared_ptr`.

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

Also, add API tests for `std::shared_ptr`, previously there were none.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97165

Files:
  lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
  lldb/source/Plugins/Language/CPlusPlus/LibCxx.h
  lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/Makefile
  lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
  lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97165.325344.patch
Type: text/x-patch
Size: 7590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210221/79e91179/attachment-0001.bin>


More information about the lldb-commits mailing list