[Lldb-commits] [PATCH] D144182: [lldb][DWARFASTParserClang] Add support for DW_TAG_LLVM_annotation

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 25 08:33:41 PST 2023


Michael137 created this revision.
Michael137 added reviewers: aprantl, dblaikie.
Herald added a reviewer: shafik.
Herald added a project: All.
Michael137 added a comment.
Michael137 updated this revision to Diff 498020.
Michael137 updated this revision to Diff 498899.
Michael137 updated this revision to Diff 499150.
Michael137 updated this revision to Diff 500432.
Michael137 updated this revision to Diff 500434.
Michael137 published this revision for review.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Alternative to https://reviews.llvm.org/D143652


Michael137 added a comment.

- Update test


dblaikie added a comment.

Any chance we can make these work more like member functions (could the ctors include their mangled names, for instance)? Or is it the innate nature of ctors having the various C1 <https://reviews.llvm.org/C1>/C2/etc versions?


dblaikie added a comment.

In D144182#4132736 <https://reviews.llvm.org/D144182#4132736>, @dblaikie wrote:

> Any chance we can make these work more like member functions (could the ctors include their mangled names, for instance)? Or is it the innate nature of ctors having the various C1 <https://reviews.llvm.org/C1>/C2/etc versions?

Oh, sorry, this is more suitable on the LLVM side... I'll make the comment over there instead.


Michael137 added a comment.

- Fix test on Linux
- Add -glldb flag to test


Michael137 added a comment.

- Add test case for `C2` constructor


Michael137 added a comment.

- Update tests


Michael137 added a comment.

- Update tets


This patch adds support for parsing `DW_TAG_LLVM_annotation`s for
abi_tag's. This allows us to recreate more accurate ASTs nodes for
constructors/destructors, where previously we relied on guessing the
correct name mangling to resolve a ctor/dtor call. If a ctor/dtor
had an abi_tag we would fail to resolve the symbol because the
"guessing algorithm" (see CollectCandidateCPlusPlusNames) doesn't
account for them.

This is necessary to support calling destructors/constructors
of numerous libcxx types, since they recently got abi-tagged.

**Testing**

- Added API test


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144182

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
  lldb/test/API/lang/cpp/external_ctor_dtor_lookup/Makefile
  lldb/test/API/lang/cpp/external_ctor_dtor_lookup/TestExternalCtorDtorLookup.py
  lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.cpp
  lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.h
  lldb/test/API/lang/cpp/external_ctor_dtor_lookup/main.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144182.500434.patch
Type: text/x-patch
Size: 8931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230225/75320e91/attachment.bin>


More information about the lldb-commits mailing list