[Lldb-commits] [PATCH] D134378: [lldb] Support simplified template names
Arthur Eubanks via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 21 11:41:57 PDT 2022
aeubanks created this revision.
Herald added a reviewer: shafik.
Herald added a project: All.
aeubanks updated this revision to Diff 461963.
aeubanks added a comment.
aeubanks added a reviewer: dblaikie.
aeubanks published this revision for review.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
comments
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:801
-const char *DWARFDebugInfoEntry::GetQualifiedName(DWARFUnit *cu,
- std::string &storage) const {
----------------
moved since now we need the clang AST to rebuild the fully qualified name
the only other caller is some logging
See https://discourse.llvm.org/t/dwarf-using-simplified-template-names/58417 for background on simplified template names.
lldb doesn't work with simplified template names because it uses DW_AT_name which doesn't contain template parameters under simplified template names.
Two major changes are required to make lldb work with simplified template names.
1. When building clang ASTs for struct-like dies, we use the name as a cache key. To distinguish between different instantiations of a template class, we need to add in the template parameters.
2. When looking up types, if the requested type name contains '<' and we didn't initially find any types from the index searching the name, strip the template parameters and search the index, then filter out results with non-matching template parameters. This takes advantage of the clang AST's ability to print full names rather than doing it by ourself.
An alternative is to fix up the names in the index to contain the fully qualified name, but that doesn't respect .debug_names.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134378
Files:
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/test/API/lang/cpp/complete-type-check/TestCppIsTypeComplete.py
lldb/test/API/lang/cpp/unique-types2/Makefile
lldb/test/API/lang/cpp/unique-types2/TestUniqueTypes.py
lldb/test/API/lang/cpp/unique-types2/main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134378.461963.patch
Type: text/x-patch
Size: 17711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220921/36ad977a/attachment-0001.bin>
More information about the lldb-commits
mailing list