[Lldb-commits] [PATCH] D53662: Give the SymbolFile plugin enough information to efficiently do exact match lookups

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 24 11:56:05 PDT 2018


zturner created this revision.
zturner added reviewers: clayborg, labath, jingham.
Herald added subscribers: JDevlieghere, aprantl.

Previously the Module would parse a type name into scope and base name during a lookup and only give the SymbolFile plugin the base name, then it would filter the results down into the match set based on whether it was supposed to be an exact match.

However, if this is supposed to be an exact match, a SymbolFile can do this lookup in O(1) time by using its internal accelerator tables, but it can't do this unless it actually receives the full name as well as the information that it is supposed to be an exact match.  Rather than being too smart, we should just let the symbol file plugin be the arbiter to decide how it wants to do lookups, so we should pass it the full name.

I'm trying to keep this as NFC for the DWARF plugin, so I took the code that was in Module.cpp and tried to rewrite it to be equivalent at the top of `SymbolFileDWARF::FindTypes`


https://reviews.llvm.org/D53662

Files:
  lldb/include/lldb/Core/Module.h
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/include/lldb/Symbol/SymbolVendor.h
  lldb/lit/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
  lldb/lit/SymbolFile/NativePDB/tag-types.cpp
  lldb/source/Core/Module.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
  lldb/source/Symbol/SymbolFile.cpp
  lldb/source/Symbol/SymbolVendor.cpp
  lldb/tools/lldb-test/lldb-test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53662.170940.patch
Type: text/x-patch
Size: 24838 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181024/eb3aa942/attachment-0001.bin>


More information about the lldb-commits mailing list