[Lldb-commits] [PATCH] D151268: [lldb][DataFormatter] Add dereference support to libstdcpp std::shared_ptr formatter
Michael Buch via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 23 16:07:55 PDT 2023
Michael137 created this revision.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This mimicks the implementation of the libstdcpp std::unique_ptr
formatter.
This has been attempted several years ago in
`0789722d85cf1f1fdbe2ffb2245ea0ba034a9f94` but was reverted in
`e7dd3972094c2f2fb42dc9d4d5344e54a431e2ce`.
The difference to the original patch is that we now maintain
a `$$dereference$$` member and we only store weak pointers
to the other children inside the synthetic frontend. This is
what the libc++ formatters do to prevent the recursion mentioned
in the revert commit.
This patch addresses https://github.com/llvm/llvm-project/issues/62825
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151268
Files:
lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151268.524925.patch
Type: text/x-patch
Size: 4463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230523/e0d2e240/attachment.bin>
More information about the lldb-commits
mailing list